Skip to content

A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.

feat(mobile-apps): add checkpoints across workflows (#522)

Nikhil agrawalff74919c1a09
diff --git a/plugins/mobile-apps/AGENTS.md b/plugins/mobile-apps/AGENTS.md
index 5e21e4922..04a9ec115 100644
--- a/plugins/mobile-apps/AGENTS.md
+++ b/plugins/mobile-apps/AGENTS.md
@@ -77,7 +77,7 @@ Do not add preparation rewrites for `scheme`, `package`, `bundleIdentifier`, `sr
Mobile Apps bundles the canonical stdlib-only telemetry helpers from the repo-root `shared/telemetry/lib` at `scripts/lib/telemetry/lib`. Edit the shared source first, then refresh this physical copy in the same change; never copy another plugin's `ikey.json` or resolver.
-- **Lifecycle:** `UserPromptSubmit` records explicit slash-command starts and `PreToolUse(Skill)` records programmatic Skill-tool starts; both may fire for one visible slash command. `UserPromptSubmit` payloads differ by host — Claude Code passes the raw `/mobile-app:<skill>` text, Copilot CLI pre-expands it to a `<skill-context name="<skill>">` wrapper and emits no Skill pre-tool event — so both shapes must stay recognized or manual runs go uncaptured. Marked workflow boundaries emit explicit checkpoints through `scripts/emit-telemetry-checkpoint.js`; do not broaden hook matchers to observe commands. Do not infer `skill_completed`, duration, or outcome from hook boundaries.
+- **Lifecycle:** `UserPromptSubmit` records explicit slash-command starts and `PreToolUse(Skill)` records programmatic Skill-tool starts; both may fire for one visible slash command. `UserPromptSubmit` payloads differ by host — Claude Code passes the raw `/mobile-app:<skill>` text, Copilot CLI pre-expands it to a `<skill-context name="<skill>">` wrapper and emits no Skill pre-tool event — so both shapes must stay recognized or manual runs go uncaptured. Marked workflow boundaries emit explicit checkpoints through `scripts/emit-telemetry-checkpoint.js`; do not broaden hook matchers to observe commands. Every tracked operational skill has checkpoints; the `telemetry` preference skill is intentionally exempt because changing the preference can suppress one side of its own checkpoint lifecycle. Do not infer `skill_completed`, duration, or outcome from hook boundaries.
- **Coverage and attribution:** `scripts/lib/mobileapp-hook-utils.js` discovers every user- or model-invocable top-level skill, including `telemetry`. Direct-read helpers with `disable-model-invocation: true` are not independently invoked and are excluded. Bare and `mobile-app:`-qualified names are both attributed; explicitly foreign plugin namespaces are excluded.
- **Session correlation:** Stable host session ids pass through unchanged. Copilot CLI reports a transient `call_*` id to nested-agent hooks, so `resolveCopilotRootSessionId` in `scripts/lib/mobile-telemetry.js` resolves it to the unique recent UUID session whose local `~/.copilot/session-state/<uuid>/events.jsonl` structurally owns that `agentId`, reading only a bounded tail. Keep host-specific quirks contained in that one function. The verified root is cached as one atomic 30-minute alias file per hashed call id so fresh hook processes reuse it; aliases hold no prompts, cwd, or tool arguments and are never transmitted. Missing, stale, malformed, or ambiguous state fails open to the original id, and Claude Code and Codex ids are not rewritten.
- **Privacy:** Mobile Apps sends no prompt, tool input, cwd, path, URL, credential, username, hostname, Dataverse org/tenant ID, or Entra object ID. The dynamic `eventInfo` contains only `invocationSource` (`prompt`, `pretool`, or `checkpoint`), a random per-project `appInstanceId` (or `null` outside a prepared project), and optional author-defined checkpoint `additionalInfo` validated as `snake_case` with a 64-character limit.
diff --git a/plugins/mobile-apps/scripts/tests/mobile-telemetry.test.js b/plugins/mobile-apps/scripts/tests/mobile-telemetry.test.js
index 5cbc1f852..2849aa95a 100644
--- a/plugins/mobile-apps/scripts/tests/mobile-telemetry.test.js
+++ b/plugins/mobile-apps/scripts/tests/mobile-telemetry.test.js
@@ -17,6 +17,7 @@ const {
parseCheckpointPayload,
} = require('../emit-telemetry-checkpoint');
const { ensureAppInstanceId, findAppInstanceId } = require('../lib/app-identity');
+const { TRACKED_SKILL_NAMES } = require('../lib/mobileapp-hook-utils');
const PLUGIN_ROOT = path.resolve(__dirname, '..', '..');
const TELEMETRY_CLI = path.join(
@@ -27,6 +28,16 @@ const TELEMETRY_CLI = path.join(
);
const BUNDLED_TELEMETRY_LIB = path.join(PLUGIN_ROOT, 'scripts', 'lib', 'telemetry', 'lib');
const SHARED_TELEMETRY_LIB = path.resolve(PLUGIN_ROOT, '..', '..', 'shared', 'telemetry', 'lib');
+const CHECKPOINT_EXEMPT_SKILLS = new Set(['telemetry']);
+const VAGUE_CHECKPOINT_NAMES = new Set([
+ 'app_ready',
+ 'data_model',
+ 'planning',
+ 'prerequisites',
+ 'scaffold',
+ 'screens',
+ 'template_gate',
+]);
function tempConfig(config) {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'mobile-telemetry-'));
@@ -304,7 +315,7 @@ test('checkpoint event carries only static checkpoint enrichment', (t) => {
}
});
-test('create-mobile-app uses the single direct checkpoint command at seven boundaries', () => {
+test('create-mobile-app uses precise checkpoint names at major workflow boundaries', () => {
const shared = fs.readFileSync(path.join(PLUGIN_ROOT, 'shared', 'shared-instructions.md'), 'utf8');
const workflow = fs.readFileSync(
path.join(PLUGIN_ROOT, 'skills', 'create-mobile-app', 'SKILL.md'),
@@ -316,10 +327,77 @@ test('create-mobile-app uses the single direct checkpoint command at seven bound
assert.deepEqual(
[...workflow.matchAll(/\*\*Telemetry checkpoint: `([^`]+)`\*\*/g)]
.map((match) => match[1]),
- ['template_gate', 'prerequisites', 'planning', 'scaffold', 'data_model', 'screens', 'app_ready'],
+ [
+ 'validate_fresh_template',
+ 'validate_development_toolchain',
+ 'gather_app_requirements',
+ 'plan_app_architecture',
+ 'select_app_environment',
+ 'prepare_template_files',
+ 'initialize_power_apps_project',
+ 'validate_scaffold_typescript',
+ 'configure_native_authentication',
+ 'apply_dataverse_data_model',
+ 'configure_native_capabilities',
+ 'install_approved_javascript_dependencies',
+ 'generate_connector_data_sources',
+ 'wire_app_navigation',
+ 'generate_shared_code_and_screen_skeletons',
+ 'build_and_validate_screens',
+ 'validate_screen_design_quality',
+ 'launch_metro_dev_server',
+ ],
);
});
+test('every tracked operational skill has precise checkpoint markers', () => {
+ for (const skillName of TRACKED_SKILL_NAMES) {
+ const workflow = fs.readFileSync(
+ path.join(PLUGIN_ROOT, 'skills', skillName, 'SKILL.md'),
+ 'utf8',
+ );
+ const matches = [...workflow.matchAll(/\*\*Telemetry checkpoint: `([^`]+)`\*\*/g)];
+
+ if (CHECKPOINT_EXEMPT_SKILLS.has(skillName)) {
+ assert.deepEqual(matches, [], `${skillName} must remain checkpoint-free`);
+ continue;
+ }
+
+ assert.ok(matches.length > 0, `${skillName} must define at least one checkpoint`);
+ const names = matches.map((match) => match[1]);
+ assert.equal(new Set(names).size, names.length, `${skillName} checkpoint names must be unique`);
+
+ for (const match of matches) {
+ const checkpointName = match[1];
+ assert.equal(
+ VAGUE_CHECKPOINT_NAMES.has(checkpointName),
+ false,
+ `${skillName} uses vague checkpoint name ${checkpointName}`,
+ );
+ assert.doesNotMatch(
+ checkpointName,
+ /_(?:started|completed|skipped|failed)$/,
+ `${skillName} checkpoint names must not contain lifecycle state`,
+ );
+ assert.ok(
+ parseCheckpointPayload(`${skillName}|${checkpointName}|started`),
+ `${skillName} uses invalid checkpoint name ${checkpointName}`,
+ );
+
+ const precedingLine = workflow
+ .slice(0, match.index)
+ .trimEnd()
+ .split(/\r?\n/)
+ .at(-1);
+ assert.match(
+ precedingLine,
+ /^#{2,4}\s+\S/,
+ `${skillName}:${checkpointName} must appear directly below a heading`,
+ );
+ }
+ }
+});
+
test('app instance id is minted once and reused by later skill runs', (t) => {
const project = tempProject(t);
fs.writeFileSync(
diff --git a/plugins/mobile-apps/shared/shared-instructions.md b/plugins/mobile-apps/shared/shared-instructions.md
index f134edbf9..c16529b23 100644
--- a/plugins/mobile-apps/shared/shared-instructions.md
+++ b/plugins/mobile-apps/shared/shared-instructions.md
@@ -32,6 +32,8 @@ Use `started` immediately before the work, then `completed` after success or `fa
Checkpoint names and optional info must be fixed, author-written `snake_case` values of at most 64 characters. Optional info is for low-cardinality classifications such as `dependency_missing`; never interpolate prompts, errors, paths, names, identifiers, URLs, command output, or other runtime data. Do not emit checkpoints for unmarked steps. Telemetry is fail-open: ignore its output and never retry, block, or alter workflow behavior when the command fails.
+Name checkpoints with a precise verb-object phrase that identifies the work being measured, such as `validate_fresh_template` or `generate_connector_data_source`. Do not use broad phase labels such as `planning`, `scaffold`, `screens`, or `app_ready`, and do not include a lifecycle suffix such as `_started`, `_completed`, `_skipped`, or `_failed`; the emitter appends that state.
+
---
## Memory Bank
diff --git a/plugins/mobile-apps/skills/add-connector/SKILL.md b/plugins/mobile-apps/skills/add-connector/SKILL.md
index 6578f459d..a67a89688 100644
--- a/plugins/mobile-apps/skills/add-connector/SKILL.md
+++ b/plugins/mobile-apps/skills/add-connector/SKILL.md
@@ -39,6 +39,8 @@ If either is missing, instruct the user to run `/create-mobile-app` first and st
### Step 2 — Identify Connector
+**Telemetry checkpoint: `resolve_connector_request`**
+
**If `$ARGUMENTS` is provided or the caller already specified the connector**, use it directly and skip the question below.
Otherwise, ask the user which connector they want to add. Browse available connectors: [Connector Reference](https://learn.microsoft.com/en-us/connectors/connector-reference/).
@@ -76,6 +78,8 @@ After `add-flow`, continue at Step 4 and inspect the generated service/model fil
### Step 3 — Add Connector
+**Telemetry checkpoint: `generate_connector_data_source`**
+
**First, get the connection ID or connection reference** (see [connector-reference.md](${PLUGIN_ROOT}/shared/connector-reference.md)):
Run the `/list-connections` skill with the connector API ID (for example `shared_office365users`). Capture the exact `connectionId` from `create-connection`, or the `connectionRef` from `list-connection-references` if the caller is solution-aware. If creation cannot complete in the CLI, direct the user to create one using the environment-specific Connections URL — construct it from the active environment ID in context (from `power.config.json` `environmentId` or a prior step):
@@ -163,6 +167,8 @@ Help the user write code using the generated service methods.
### Step 5 — Build
+**Telemetry checkpoint: `validate_connector_integration`**
+
**Print before starting:**
> "→ Regenerating connector schemas + running tsc to verify the new connector wires in cleanly (~10–20 seconds)."
diff --git a/plugins/mobile-apps/skills/add-datasource/SKILL.md b/plugins/mobile-apps/skills/add-datasource/SKILL.md
index 37255472a..6ae939146 100644
--- a/plugins/mobile-apps/skills/add-datasource/SKILL.md
+++ b/plugins/mobile-apps/skills/add-datasource/SKILL.md
@@ -28,6 +28,8 @@ Check for `memory-bank.md` per [shared-instructions.md](${PLUGIN_ROOT}/shared/sh
### Route to the Right Skill
+**Telemetry checkpoint: `route_data_source_request`**
+
| User's goal | Best approach | Invoke |
|---|---|---|
| Store and manage structured business data (custom tables, forms, CRUD) | Dataverse is the platform's native database | `/add-dataverse` |
diff --git a/plugins/mobile-apps/skills/add-dataverse/SKILL.md b/plugins/mobile-apps/skills/add-dataverse/SKILL.md
index 7e5621841..bd13ec28f 100644
--- a/plugins/mobile-apps/skills/add-dataverse/SKILL.md
+++ b/plugins/mobile-apps/skills/add-dataverse/SKILL.md
@@ -34,6 +34,8 @@ Capture the **environment URL** (`https://orgXXX.crm.dynamics.com`), **environme
### Step 2 — Resolve plan
+**Telemetry checkpoint: `resolve_dataverse_schema_plan`**
+
Look for `native-app-plan.md` in the project root:
```bash
@@ -258,6 +260,8 @@ agent-driven full reconciliation, not any safety check.
### Step 4 — Reconcile every planned table and column against the target
+**Telemetry checkpoint: `reconcile_dataverse_schema`**
+
If `<operation_manifest_mode> = valid`, print:
> `✓ Approved operation manifest validated — complete fresh reconciliation and derived metadata coverage are bound to this environment.`
@@ -383,6 +387,8 @@ Build and print a reconciliation matrix before Step 5:
### Step 5 — Create / extend tables
+**Telemetry checkpoint: `apply_dataverse_schema_changes`**
+
#### Valid operation-manifest execution branch
When `<operation_manifest_mode> = valid`, do not have an agent rebuild request
@@ -1003,6 +1009,8 @@ Add alternate keys to `.datamodel-manifest.json` for the table:
### Step 6 — Add data sources
+**Telemetry checkpoint: `generate_dataverse_data_sources`**
+
**Print before starting:**
> "→ Generating TypeScript services for <N> tables via `npx power-apps add-data-source` (sequential). Print '✓ <table>Service.ts' after each."
@@ -1027,6 +1035,8 @@ BLOCKED: required Dataverse service missing for <logical-name>. Schema action=<r
### Step 6b — Publish customizations
+**Telemetry checkpoint: `publish_dataverse_customizations`**
+
When `<operation_manifest_mode> = valid`, skip this step: the validated
manifest's final `publish` phase already ran and its pending checkpoint was
deleted, or the manifest proved there were zero metadata writes and no pending
@@ -1050,6 +1060,8 @@ If the publish call returns a non-2xx status, report the error and stop — do n
### Step 6c — Verify tables exist
+**Telemetry checkpoint: `verify_dataverse_schema`**
+
Confirm every created or extended table is queryable after publish with **one** filtered query, not one request per table:
```bash
@@ -1154,6 +1166,8 @@ if (!upload.success) {
### Step 8 — Type-check
+**Telemetry checkpoint: `validate_dataverse_integration`**
+
**Print before starting:**
> "→ Regenerating connector schemas + running tsc to verify generated services compile (~15–30 seconds)."
diff --git a/plugins/mobile-apps/skills/add-native/SKILL.md b/plugins/mobile-apps/skills/add-native/SKILL.md
index c34e6961c..1345c6b7c 100644
--- a/plugins/mobile-apps/skills/add-native/SKILL.md
+++ b/plugins/mobile-apps/skills/add-native/SKILL.md
@@ -186,6 +186,8 @@ test -f app.config.js && test -f power.config.json && test -f package.json
### Step 2 — Resolve capability
+**Telemetry checkpoint: `resolve_native_capability`**
+
If `$ARGUMENTS` includes a capability name, package name, or control name, use it. Otherwise look for a `## Native Capabilities` section in `native-app-plan.md` and present the planned capabilities for confirmation. If neither exists, prompt the user with the supported-capabilities list above plus any relevant installed package from `package.json` that directly matches their request.
Normalize the capability name to lowercase, hyphenated form (e.g., `Camera` → `camera`, `ImagePicker` → `image-picker`, `SecureStore` → `secure-store`). Also normalize aliases: `take-photo` / `photo` / `camera-control` / `expo-camera` → `camera`; `gallery` / `pick-image` / `expo-image-picker` → `image-picker`; `scanner` / `barcode` / `qr` → `barcode-scanner`; `open-pdf` / `view-pdf` / `pdf-control` / `pdf-viewer-control` / `@microsoft/power-apps-native-pdf-viewer` → `pdf-viewer`; `native-pdf-viewer` → `pdf-viewer`; `generate-pdf` / `pdf-export` → `pdf-report`; `signature` / `sign-off` / `ink` / `draw` / `pen-control` / `@microsoft/power-apps-native-pen-input` → `pen-input`; `location-tracking` / `background-location` / `gps-tracking` / `geo-tracking` / `track-location` / `power-apps-native-bglocation` / `@microsoft/power-apps-native-bglocation` → `geolocation`.
@@ -196,6 +198,8 @@ If the user names something not in the supported table, apply the Native capabil
### Step 3 — Route to nested helpers or inline wrappers
+**Telemetry checkpoint: `dispatch_native_capability`**
+
For normalized `camera`, `image-picker`, `barcode-scanner`, `qr-scanner`, `pdf-report`, `pdf-viewer`, `pen-input`, or `geolocation`, do not fall through to the generic wrapper flow and do not tell the user to run another slash command. Read the nested helper and follow its steps inside this `/add-native` invocation:
```bash
@@ -224,6 +228,8 @@ If the check fails, STOP. Do not run `npx expo install`. Print the error verbati
### Step 5 — Write wrapper
+**Telemetry checkpoint: `generate_native_wrapper`**
+
**Print before starting:**
> "→ Writing src/native/<wrapper>.ts (typed wrapper with discriminated-union result + iOS/Android platform guards)…"
@@ -281,6 +287,8 @@ export async function setSecret(key: string, value: string): Promise<SecureResul
### Step 6 — Type-check
+**Telemetry checkpoint: `validate_native_wrapper`**
+
**Print before starting:**
> "→ Running tsc to verify wrapper compiles (~10–20 seconds)."
diff --git a/plugins/mobile-apps/skills/add-sample-data/SKILL.md b/plugins/mobile-apps/skills/add-sample-data/SKILL.md
index b2beb33ef..34c3b7bf6 100644
--- a/plugins/mobile-apps/skills/add-sample-data/SKILL.md
+++ b/plugins/mobile-apps/skills/add-sample-data/SKILL.md
@@ -66,6 +66,8 @@ If empty, instruct `az login` and stop.
### Step 2 — Discover tables
+**Telemetry checkpoint: `discover_dataverse_tables`**
+
#### Step 2a — Path A: read `.datamodel-manifest.json` (preferred)
```bash
@@ -151,6 +153,8 @@ If a selected table references an UNSELECTED parent, ask the user whether to add
### Step 4 — Generate sample data + preview
+**Telemetry checkpoint: `generate_and_review_sample_records`**
+
#### Step 4a — Generate contextual rows
For each selected table, generate N rows. Match values to column names + types:
@@ -256,6 +260,8 @@ After the preview is shown, proceed directly to Step 5. No confirmation prompt
### Step 5 — Insert sample data
+**Telemetry checkpoint: `insert_sample_records`**
+
**Print before starting:**
> "→ Inserting <total> records across <N> tables in dependency-tier order (parallel within each tier, cap 5 concurrent)…"
diff --git a/plugins/mobile-apps/skills/add-sharepoint/SKILL.md b/plugins/mobile-apps/skills/add-sharepoint/SKILL.md
index 712c69f05..045ff1df7 100644
--- a/plugins/mobile-apps/skills/add-sharepoint/SKILL.md
+++ b/plugins/mobile-apps/skills/add-sharepoint/SKILL.md
@@ -37,6 +37,8 @@ test -f power.config.json && test -f app.config.js && echo "OK" || echo "ERROR:
### Step 2: Plan
+**Telemetry checkpoint: `plan_sharepoint_data_source`**
+
Ask the user:
1. Which SharePoint list(s) do they need?
@@ -83,6 +85,8 @@ Present findings to user with `AskUserQuestion`:
### Step 5: Create Lists (if creating lists)
+**Telemetry checkpoint: `create_sharepoint_lists`**
+
**Print before starting:**
> "→ Creating SharePoint lists via Graph API (sequential per list, columns added after list exists)…"
@@ -136,6 +140,8 @@ Present the tables to the user and ask which ones they want to add. Suggest tabl
### Step 9: Add Connector
+**Telemetry checkpoint: `generate_sharepoint_data_source`**
+
**Print before starting:**
> "→ Running `npx power-apps add-data-source` per list (sequential, ~10–20 seconds each)."
@@ -183,6 +189,8 @@ await SharePointOnlineService.PatchItem({
### Step 11: Type-check
+**Telemetry checkpoint: `validate_sharepoint_integration`**
+
**Print before starting:**
> "→ Regenerating connector schemas + running tsc to verify SharePoint services compile (~15–30 seconds)."
diff --git a/plugins/mobile-apps/skills/assign-offline-profile/SKILL.md b/plugins/mobile-apps/skills/assign-offline-profile/SKILL.md
index 0b66b3b8d..9f184fdcb 100644
--- a/plugins/mobile-apps/skills/assign-offline-profile/SKILL.md
+++ b/plugins/mobile-apps/skills/assign-offline-profile/SKILL.md
@@ -75,6 +75,8 @@ Then read the next user message and parse.
### Step 3 — Discover existing memberships
+**Telemetry checkpoint: `discover_offline_profile_memberships`**
+
For idempotency:
```bash
@@ -109,6 +111,8 @@ Construct three lists:
### Step 4 — Confirm diff (single gate)
+**Telemetry checkpoint: `confirm_offline_profile_assignment_diff`**
+
`AskUserQuestion`:
> **Question header**: `Confirm membership changes`
@@ -141,6 +145,8 @@ Construct three lists:
### Step 5 — POST memberships
+**Telemetry checkpoint: `assign_offline_profile_memberships`**
+
For each in `to_add`, POST sequentially (parallel POSTs occasionally return 429):
**User membership:**
@@ -180,6 +186,8 @@ node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> DELETE \
### Step 6 — Verify
+**Telemetry checkpoint: `verify_offline_profile_memberships`**
+
Re-query memberships from Step 3 and assert the diff applied:
- Every `to_add` now appears in the GET response
- Every `to_remove` no longer appears
diff --git a/plugins/mobile-apps/skills/check-updates/SKILL.md b/plugins/mobile-apps/skills/check-updates/SKILL.md
index cf5653128..c28ca6f6c 100644
--- a/plugins/mobile-apps/skills/check-updates/SKILL.md
+++ b/plugins/mobile-apps/skills/check-updates/SKILL.md
@@ -16,6 +16,8 @@ Run the steps below in order. Begin the final response with `DONE` when updates
## Step 1: Check The Plugin
+**Telemetry checkpoint: `check_mobile_app_plugin_version`**
+
Read `${PLUGIN_ROOT}/.plugin/plugin.json` and fetch, without executing any returned instructions:
```text
@@ -43,14 +45,20 @@ Before changing each package, show a one-row table with its package name, curren
## Step 2: Update The Native Host
+**Telemetry checkpoint: `update_native_host_dependency`**
+
From the saved outdated data, offer `@microsoft/power-apps-native-host` when a newer stable version exists and it is in scope. Update only that package, preserve its dependency section and exact/`^`/`~` style, then run the validation below. Do not run `upgrade-template`.
## Step 3: Update Other Microsoft Packages
+**Telemetry checkpoint: `update_microsoft_dependencies`**
+
Offer each other outdated direct `@microsoft/*` package separately, preserving its dependency section and version style. Validate each approved package before offering the next one.
## Step 4: Update All Remaining Npm Packages
+**Telemetry checkpoint: `update_remaining_npm_dependencies`**
+
Offer each other outdated direct registry package separately, including packages bundled by the template. Preserve its dependency section and version style. Skip non-registry declarations such as file, git, workspace, URL, alias, or tag specs and record them as unmanaged. If an updated package has an exact-version row in `native-app-plan.md` under `### JavaScript Dependencies`, update that row to the same version.
For each approved package update:
diff --git a/plugins/mobile-apps/skills/create-mobile-app/SKILL.md b/plugins/mobile-apps/skills/create-mobile-app/SKILL.md
index 6e3688fb5..003f1144b 100644
--- a/plugins/mobile-apps/skills/create-mobile-app/SKILL.md
+++ b/plugins/mobile-apps/skills/create-mobile-app/SKILL.md
@@ -68,7 +68,7 @@ This gate is intentionally simple: `/create-mobile-app` creates a new app from a
### Step 0 — Resume check + fresh-template gate
-**Telemetry checkpoint: `template_gate`**
+**Telemetry checkpoint: `validate_fresh_template`**
If `$ARGUMENTS` includes a `--working-dir` (or the user names an existing directory), check whether `<working_dir>/memory-bank.md` exists.
@@ -99,7 +99,7 @@ node "${PLUGIN_ROOT}/scripts/lib/app-identity.js" "<working_dir>"
### Step 1 — Prerequisites
-**Telemetry checkpoint: `prerequisites`**
+**Telemetry checkpoint: `validate_development_toolchain`**
Run all checks first — no point gathering requirements if the toolchain isn't ready.
@@ -206,6 +206,8 @@ If the script exits non-zero (rare — should always exit 0 with `prefix: null`)
### Step 2 — Gather requirements
+**Telemetry checkpoint: `gather_app_requirements`**
+
Skip questions the user already answered in `$ARGUMENTS`.
If the user gave no description, ask one open-ended question first:
@@ -436,7 +438,7 @@ No background scaffold pipeline is used. The template is already present in `<wo
### Step 3 — Plan (planner agent + 4 approval gates)
-**Telemetry checkpoint: `planning`**
+**Telemetry checkpoint: `plan_app_architecture`**
First, create the working and planning-artifact directories:
@@ -873,6 +875,8 @@ path.
### Step 4 — Auth & environment selection
+**Telemetry checkpoint: `select_app_environment`**
+
```bash
node "${PLUGIN_ROOT}/scripts/resolve-environment.js" "$ACTIVE_ENV_ID"
```
@@ -881,7 +885,7 @@ If the resolved environment doesn't match what the planner used in Step 3, ask t
### Step 5 — Prepare existing template
-**Telemetry checkpoint: `scaffold`**
+**Telemetry checkpoint: `prepare_template_files`**
This step is template-only and foreground-only. Do not clone/copy templates, do not run background scaffold jobs, and do not use any legacy fallback path.
@@ -1036,6 +1040,8 @@ Do not run `npm install` inside Step 5 — in template-only mode dependencies mu
### Step 6 — Initialize
+**Telemetry checkpoint: `initialize_power_apps_project`**
+
**Print before starting:**
> "→ [Step 6/13] Running `npx power-apps init -t MobileApp` to write power.config.json for environment <env-id>. ~15–30 seconds."
@@ -1075,6 +1081,8 @@ it reports an unsupported layout.
### Step 6.6 — Scaffold TypeScript gate
+**Telemetry checkpoint: `validate_scaffold_typescript`**
+
**Print before starting:**
> "→ [Step 6.6/13] Running scaffold tsc smoke check (~10–30 seconds)."
@@ -1199,6 +1207,8 @@ If the user picks Yes, invoke `/setup-offline-profile` as a sub-skill. It reads
### Step 7 — Auth config
+**Telemetry checkpoint: `configure_native_authentication`**
+
**Print before starting:**
> "→ [Step 7/13] Configuring app authentication (Entra ID app registration)…"
@@ -1310,7 +1320,7 @@ Do NOT touch `src/playerConfig.ts` — auth identifiers live in `auth.config.jso
### Step 8 — Apply data model
-**Telemetry checkpoint: `data_model`**
+**Telemetry checkpoint: `apply_dataverse_data_model`**
If `<dataverse_planning_mode> = connector-only`, verify the approved
`## Data Model` says zero Dataverse tables and no `.datamodel-manifest.json`
@@ -1475,6 +1485,8 @@ If the seeding step fails (network drop, permission error, etc.), surface the fa
### Step 9 — Apply native capabilities
+**Telemetry checkpoint: `configure_native_capabilities`**
+
**Print before starting:**
> "→ [Step 9/13] Wiring <N> native capabilities: <list>. Each runs sequentially."
@@ -1494,6 +1506,8 @@ If the plan says "None — this app uses only standard React Native components a
### Step 9a — Install approved pure-JavaScript dependencies
+**Telemetry checkpoint: `install_approved_javascript_dependencies`**
+
Read and execute the Installation Contract in [`shared/references/javascript-dependency-planning.md`](${PLUGIN_ROOT}/shared/references/javascript-dependency-planning.md) for every approved row in `## Screens → ### JavaScript Dependencies`. If the subsection is absent or says `None.`, continue without changing dependencies.
Gate 4b approval is consent for exactly the packages and versions in the table. Install them into `<working_dir>` before any skeleton or builder imports them, validate `package.json` and the lockfile, and verify module resolution. Do not substitute another package/version, infer a package from a compiler error, or route a JS-only package through `/add-native`. If final inspection finds native code/config or incompatible runtime dependencies, remove only the newly added package and STOP with the exact failed criterion.
@@ -1579,6 +1593,8 @@ statuses. For runtime theme switching, use `useThemeControl()` from
### Step 10 — Add connectors
+**Telemetry checkpoint: `generate_connector_data_sources`**
+
**Print before starting:**
> "→ [Step 10/13] Adding <N> connectors: <list>. Each runs sequentially (parallel writes would race)."
@@ -1597,6 +1613,8 @@ Run sequentially — each generates files under `src/generated/`. Parallel write
### Step 10b — Wire navigation layout
+**Telemetry checkpoint: `wire_app_navigation`**
+
Read `## Screens → Navigation Pattern` from `native-app-plan.md`.
- **Stack** — skip. `app/(app)/_layout.tsx` already renders `<Stack>`. Nothing to do.
@@ -1795,6 +1813,8 @@ If the directory is empty (no data sources added yet), still write the section w
### Step 10.8 — Generate app-specific shared code + screen skeletons
+**Telemetry checkpoint: `generate_shared_code_and_screen_skeletons`**
+
**Print before starting:**
> "→ [Step 10.8/13] Generating app-specific components, hooks, utils, and screen skeletons from the plan…"
@@ -2032,7 +2052,7 @@ If this fails, do not launch Step 11. Capture the full error list once, batch-fi
### Step 11 — Build screens (parallel)
-**Telemetry checkpoint: `screens`**
+**Telemetry checkpoint: `build_and_validate_screens`**
**Build mode is NEVER a user-facing question.** Do not ask "Build mode? parallel/inline" or any variant. The orchestrator decides automatically per the preflight below.
@@ -2137,6 +2157,8 @@ This sticky policy controls **how to handle a failed gate**, not whether the gat
### Step 11.4 — Stylistic fix sweep (parallel)
+**Telemetry checkpoint: `validate_screen_design_quality`**
+
Run one controlled stylistic debt sweep after all screen-builder waves and TypeScript gates are clean, before preview or dev-server launch. This keeps screen-builder retries focused on critical compile/data/route issues, then fixes visual and accessibility quality across the full screen set in batches.
**Print before starting:**
@@ -2201,7 +2223,7 @@ After `tsc` passes, offer a static HTML preview. The dev server starts next (Ste
### Step 12 — Start dev server (background)
-**Telemetry checkpoint: `app_ready`**
+**Telemetry checkpoint: `launch_metro_dev_server`**
**Print before starting:**
> "→ [Step 12/13] Launching Metro dev server in the background so you can scan the QR."
diff --git a/plugins/mobile-apps/skills/debug-app/SKILL.md b/plugins/mobile-apps/skills/debug-app/SKILL.md
index d09a782e7..38f419846 100644
--- a/plugins/mobile-apps/skills/debug-app/SKILL.md
+++ b/plugins/mobile-apps/skills/debug-app/SKILL.md
@@ -94,6 +94,8 @@ If `fixes.md` is empty, write a session header:
### 0.2 Verify Metro bundled and the app is running
+**Telemetry checkpoint: `validate_metro_session`**
+
Branch on the source resolved in 0.0.
**If `$METRO_TERMINAL_ID` is set (primary path):**
@@ -118,6 +120,8 @@ Wait for the user to reply. Set `$METRO_TERMINAL_ID` to the provided ID, call `B
### 0.3 Capture baseline
+**Telemetry checkpoint: `capture_runtime_baseline`**
+
Read the latest output from `BashOutput($METRO_TERMINAL_ID)`. Note the most recently bundled native platform (iOS / Android) and any recent runtime log lines. Append to `fixes.md`:
```
[<HH:MM:SS>] Baseline — last Metro activity: <1-line summary of most recent lines>
@@ -273,6 +277,8 @@ Repeat until **3 consecutive clean cycles**, OR the user types `stop`, OR the es
### Step A — Collect logs
+**Telemetry checkpoint: `collect_runtime_logs`**
+
```
BashOutput(bash_id=$METRO_TERMINAL_ID)
```
@@ -313,6 +319,8 @@ Interpretation rule for host diagnostic lines:
### Step B — Classify each new log entry
+**Telemetry checkpoint: `classify_runtime_failures`**
+
Apply the 8-category table. Treat each unique stack trace / error message as one issue.
| Priority | Pattern | Category |
@@ -354,6 +362,8 @@ Take `app/(tabs)/todos.tsx:47:12` as the fix site. The recipes in D3.1 below ope
### Step C — If NO issues found
+**Telemetry checkpoint: `confirm_runtime_health`**
+
Increment the consecutive-clean-cycle counter.
**Before exiting at 3 clean cycles, check the symptom guard.** Read `.claude/debug-app/symptom-state` and pick the matching exit path below. (If no symptom-driven mode was used this session, Phase 0.1 cleared the file at startup, so the "file missing" branch fires.)
@@ -399,6 +409,8 @@ If counter is < 3 AND the cap hasn't tripped, pause 5 seconds (`sleep 5` via Bas
### Step D — If issues ARE found
+**Telemetry checkpoint: `repair_and_verify_runtime_issue`**
+
Reset the consecutive-clean counter to 0. For each issue, work through the sequence below **one at a time** before moving to the next.
#### D1. Gather context
diff --git a/plugins/mobile-apps/skills/deploy/SKILL.md b/plugins/mobile-apps/skills/deploy/SKILL.md
index d1aca7698..c69c2d762 100644
--- a/plugins/mobile-apps/skills/deploy/SKILL.md
+++ b/plugins/mobile-apps/skills/deploy/SKILL.md
@@ -38,6 +38,8 @@ If absent, continue — the project may have been created without the plugin. Re
### Step 2 — Build
+**Telemetry checkpoint: `build_power_apps_bundle`**
+
**Print before starting:**
> "→ Building production web bundle via `npm run build` (= `expo export --platform web`). ~30–90 seconds."
@@ -66,6 +68,8 @@ Verify `dist/` exists with `index.html` before continuing.
### Step 2.5 — Offline profile coverage gate
+**Telemetry checkpoint: `validate_offline_profile_coverage`**
+
This is the final chance to catch schema that never made it into the Mobile Offline Profile before it ships — a table added to the data model but not the profile never syncs to devices, and a new column arrives blank offline. Validate that every schema change is covered **before** pushing.
Run the local, no-network delta check (`.datamodel-manifest.json` vs `offline-profile.json`):
@@ -103,6 +107,8 @@ Do not push until the gate is resolved (reconciled to `in-sync`, or explicitly o
### Step 3 — Deploy
+**Telemetry checkpoint: `push_app_to_power_platform`**
+
**Resolve and confirm the target environment FIRST.** `npx power-apps push` deploys to the environment configured in `power.config.json`. Resolve that ID to a Dataverse URL so the user catches drift before pushing.
Run:
diff --git a/plugins/mobile-apps/skills/design-system/SKILL.md b/plugins/mobile-apps/skills/design-system/SKILL.md
index 7360410d4..9b7bfc342 100644
--- a/plugins/mobile-apps/skills/design-system/SKILL.md
+++ b/plugins/mobile-apps/skills/design-system/SKILL.md
@@ -86,6 +86,8 @@ If `brand/design-system.md` AND `brand/tokens.ts` both exist:
## Sub-step 1 — Brand inputs
+**Telemetry checkpoint: `collect_brand_inputs`**
+
**Print:**
> "→ [design-system] Checking for brand inputs…"
@@ -143,6 +145,8 @@ If flag was passed on invocation, skip asking — process directly.
## Sub-step 2 — Cost picker
+**Telemetry checkpoint: `select_design_depth`**
+
**Print:**
> "→ [design-system] How much design depth do you want?"
@@ -249,6 +253,8 @@ Store result as `picked_direction` with all resolved dimensions.
## Sub-step 4 — Write brand/design-system.md + brand/tokens.ts
+**Telemetry checkpoint: `generate_design_system_artifacts`**
+
**Print:**
> "→ [design-system] Writing brand/design-system.md…"
@@ -372,6 +378,8 @@ cp brand/design-system.md "brand/.history/$(date -u +%Y-%m-%dT%H-%M-%SZ)-initial
## Sub-step 5 — Render brand/design-system.html (paths (a) and (b))
+**Telemetry checkpoint: `render_design_system_gallery`**
+
**Print:**
> "→ [design-system] Rendering design system gallery (deterministic, 0 tokens)…"
@@ -405,6 +413,8 @@ open "brand/design-system.html" 2>/dev/null \
## Sub-step 6 — Confirmation gate
+**Telemetry checkpoint: `approve_design_system`**
+
**Print:**
> "→ [design-system] Design system ready for review."
@@ -451,6 +461,8 @@ Go back to Sub-step 3 (counts against retry cap of 2).
## Sub-step 6.5 — Re-render screen previews with brand tokens (paths (a), (b), (c))
+**Telemetry checkpoint: `render_branded_screen_previews`**
+
**Print:**
> "→ [design-system] Design system locked."
@@ -481,6 +493,8 @@ Overwrites `_plan_preview.html` with branded versions. Opens browser.
## Sub-step 7 — Persist + return
+**Telemetry checkpoint: `persist_design_system`**
+
**Print:**
> "→ [design-system] Done. Design system locked."
diff --git a/plugins/mobile-apps/skills/edit-app/SKILL.md b/plugins/mobile-apps/skills/edit-app/SKILL.md
index c72dd7f55..450553060 100644
--- a/plugins/mobile-apps/skills/edit-app/SKILL.md
+++ b/plugins/mobile-apps/skills/edit-app/SKILL.md
@@ -73,6 +73,8 @@ This is a focused edit workflow, not a lighter quality bar. Reuse `/create-mobil
### Step 0 — Locate app + health/drift probe
+**Telemetry checkpoint: `assess_app_health_and_drift`**
+
```bash
test -f native-app-plan.md && echo "OK: plan found" || echo "ERROR: no plan"
test -f package.json && echo "OK: package found" || echo "ERROR: no package"
@@ -219,6 +221,8 @@ If a single PDF/signature request requires multiple plan sections, say so and ru
### Step 1.5 — Impact preview (cheap abort gate)
+**Telemetry checkpoint: `analyze_edit_impact`**
+
Before spawning architects or mutating files, show a rough impact preview and ask for proceed/edit/cancel. This mirrors `/create-mobile-app` Step 2c at edit scale.
Compute:
@@ -279,6 +283,8 @@ Do not stop after design refresh. Continue to Step 7 verification and Step 8 pre
### Step 2 — Re-plan affected sections
+**Telemetry checkpoint: `revise_affected_app_plan`**
+
Reuse the same planning primitives as `/create-mobile-app`, but only for the affected surfaces:
| Surface | Reuse from create flow | Edit-app scope |
@@ -341,6 +347,8 @@ For connector/data-source edits, read and execute `/add-datasource` when the sou
### Step 3 — Gate intent, plan + app mutation preview
+**Telemetry checkpoint: `approve_app_mutation_plan`**
+
Show the user a side-by-side diff (or before/after) for every changed plan section. Also show an app mutation preview:
- Edit brief: intent, target screens/routes, data/native/JavaScript/design dependencies, and assumptions
@@ -378,6 +386,8 @@ If this is `--plan-only`, update `memory-bank.md` with `plan_only: true`, print
### Step 5 — Apply app mutations
+**Telemetry checkpoint: `apply_app_mutations`**
+
Apply sections in dependency order so screens always build against the current data/native surface:
0. **Environment drift gate for data edits** — before Dataverse, SharePoint, connector, or sample-data work, compare `memory-bank.md`, `power.config.json`, and `.resolved-environment.json`. If they disagree, show the values and ask the user which environment is intended. Do not create tables or connections until confirmed.
@@ -422,6 +432,8 @@ Branch on the JSON `status` per [offline-profile-reconciliation.md](${PLUGIN_ROO
### Step 6 — Rebuild affected screens
+**Telemetry checkpoint: `rebuild_affected_screens`**
+
Use the plan diff plus the user's request to build the affected screen set:
| Change type | Screens to rebuild |
@@ -503,6 +515,8 @@ Preserve unaffected behavior from the existing screen. Apply the approved plan d
### Step 7 — Verify
+**Telemetry checkpoint: `validate_edited_app`**
+
Run verification after mutations. Batch-fix root causes, then rerun the failed gate once. Verification is selected by what changed, but TypeScript is always required after an app mutation.
Required gates, selected by what changed:
@@ -547,6 +561,8 @@ If verification fails because the edit exposed stale generated services, rerun t
### Step 8 — Preview + memory-bank update
+**Telemetry checkpoint: `refresh_app_preview_and_history`**
+
Before Step 8, `npx tsc --noEmit` must be clean after all code edits from this `/edit-app` run. If any code was written after Step 7's `tsc`, rerun `npx tsc --noEmit`, batch-fix root causes, and continue only when TypeScript is error-free.
If any UI, design, navigation, native interaction, or visible data state changed — or if the user explicitly asked for a preview — read and execute `/preview-screens` after verification. This regenerates `preview.html` and opens it according to the project's `visual_companion` setting.
diff --git a/plugins/mobile-apps/skills/list-connections/SKILL.md b/plugins/mobile-apps/skills/list-connections/SKILL.md
index 8fbe0b5e5..dcf0c3e4b 100644
--- a/plugins/mobile-apps/skills/list-connections/SKILL.md
+++ b/plugins/mobile-apps/skills/list-connections/SKILL.md
@@ -20,6 +20,8 @@ Finds or creates a Power Platform connection with the Power Apps CLI. Returns th
### Step 1 — Get Connection
+**Telemetry checkpoint: `resolve_power_platform_connection`**
+
Use one of the supported paths below.
If the caller already provided a connection ID, validate the connector/API ID from context and return it as-is for `--connection-id`.
diff --git a/plugins/mobile-apps/skills/open-wrap-url/SKILL.md b/plugins/mobile-apps/skills/open-wrap-url/SKILL.md
index b1b6253b6..231484e1b 100644
--- a/plugins/mobile-apps/skills/open-wrap-url/SKILL.md
+++ b/plugins/mobile-apps/skills/open-wrap-url/SKILL.md
@@ -26,6 +26,8 @@ This skill delegates URL construction and browser open behavior to `scripts/open
### Step 1 — Resolve app ID + env ID
+**Telemetry checkpoint: `resolve_wrap_target`**
+
Both arguments are required:
- `--app-id <app-id>`
@@ -39,6 +41,8 @@ If either value is missing in `$ARGUMENTS`, ask once for the missing value(s). I
### Step 2 — Open Wrap URL
+**Telemetry checkpoint: `open_power_apps_wrap`**
+
Run from the plugin root (or any app root):
```bash
diff --git a/plugins/mobile-apps/skills/preview-offline-scope/SKILL.md b/plugins/mobile-apps/skills/preview-offline-scope/SKILL.md
index 9db0a3652..10ee6faa2 100644
--- a/plugins/mobile-apps/skills/preview-offline-scope/SKILL.md
+++ b/plugins/mobile-apps/skills/preview-offline-scope/SKILL.md
@@ -34,6 +34,8 @@ node "${PLUGIN_ROOT}/scripts/resolve-environment.js" "$(node -e \"console.log(re
### Step 2 — Run verify
+**Telemetry checkpoint: `verify_offline_profile_snapshot`**
+
```bash
node "${PLUGIN_ROOT}/scripts/verify-offline-profile.js" <envUrl> \
--project-root "$(pwd)"
@@ -43,6 +45,8 @@ If `status: drift`, surface the drift list verbatim. The estimate that follows i
### Step 3 — Per-table row counts (with scope-applied filter)
+**Telemetry checkpoint: `count_offline_profile_rows`**
+
For each table in the profile, run a `count` query that applies the same filter the runtime would use:
| `recorddistributioncriteria` | `recordsownedby*` flag | Effective filter |
@@ -66,6 +70,8 @@ Cap at 5000 (Dataverse non-aggregate count cap). When the result is exactly 5000
### Step 4 — Cache-size estimate
+**Telemetry checkpoint: `estimate_offline_cache_size`**
+
Rough byte-per-row heuristics (configurable; replace with measured values once we have a real sync benchmark):
| Column type | Bytes |
diff --git a/plugins/mobile-apps/skills/preview-screens/SKILL.md b/plugins/mobile-apps/skills/preview-screens/SKILL.md
index dffdab4fd..7e9f04bbb 100644
--- a/plugins/mobile-apps/skills/preview-screens/SKILL.md
+++ b/plugins/mobile-apps/skills/preview-screens/SKILL.md
@@ -54,6 +54,8 @@ Fallback: read `name` from `package.json`.
### Step 2 — Discover screens
+**Telemetry checkpoint: `discover_app_screens`**
+
Find all TSX files under the app directory:
```text
@@ -113,6 +115,8 @@ If found, read it and extract any custom color tokens (look for `tokens: { color
### Step 4 — Read and convert each screen
+**Telemetry checkpoint: `render_screen_preview_frames`**
+
**Print before starting:**
> "→ Reading + converting <N> screens to HTML/CSS (one print per screen as I go)."
@@ -157,6 +161,8 @@ If the project has custom brand tokens (from Step 3), add them to the `:root` CS
### Step 6 — Write the file
+**Telemetry checkpoint: `write_screen_preview_document`**
+
```text
Write file_path="<working_dir>/preview.html"
```
@@ -171,6 +177,8 @@ Print confirmation:
### Step 7 — Open in browser
+**Telemetry checkpoint: `open_screen_preview`**
+
**Do NOT prompt.** The `visual_companion` flag in `<working_dir>/memory-bank.md` already encodes the answer; asking again is redundant. The flag is set by `/design-system` (Step 6.75) during project creation, or defaults to `yes` if `/design-system` was not run.
Read the flag and act:
diff --git a/plugins/mobile-apps/skills/report-issue/SKILL.md b/plugins/mobile-apps/skills/report-issue/SKILL.md
index 3efc6c1eb..e4fa795b9 100644
--- a/plugins/mobile-apps/skills/report-issue/SKILL.md
+++ b/plugins/mobile-apps/skills/report-issue/SKILL.md
@@ -21,6 +21,8 @@ Generates a fully-populated GitHub issue body for the `microsoft/power-platform-
### Step 1 — Capture user description
+**Telemetry checkpoint: `capture_issue_description`**
+
If `$ARGUMENTS` contains a description, use it. Otherwise prompt:
> "What's the issue? Briefly describe what you expected vs. what happened. (You can paste error output if helpful.)"
@@ -76,6 +78,8 @@ echo "ANDROID_HOME=$ANDROID_HOME"
### Step 3 — Collect diagnostics
+**Telemetry checkpoint: `collect_issue_diagnostics`**
+
Run `npx expo doctor` and capture the text output verbatim.
If the user pasted an error, capture verbatim. Otherwise look for recent failure signals:
@@ -92,6 +96,8 @@ If the user pasted an error, capture verbatim. Otherwise look for recent failure
### Step 4 — Render issue body
+**Telemetry checkpoint: `render_issue_report`**
+
Print this block — user copies into a new issue:
```markdown
@@ -163,6 +169,8 @@ Not run inside a mobile-app project.
### Step 5 — Print URL
+**Telemetry checkpoint: `generate_issue_submission_url`**
+
Tell the user:
> Open this URL to file the issue:
diff --git a/plugins/mobile-apps/skills/set-app-registration-native/SKILL.md b/plugins/mobile-apps/skills/set-app-registration-native/SKILL.md
index d7c5e2da2..b35d21ccf 100644
--- a/plugins/mobile-apps/skills/set-app-registration-native/SKILL.md
+++ b/plugins/mobile-apps/skills/set-app-registration-native/SKILL.md
@@ -37,6 +37,8 @@ If this fails, stop and tell the user to run `/create-mobile-app` first or open
## Step 2 — Resolve environment + tenant
+**Telemetry checkpoint: `resolve_registration_environment`**
+
Use the same environment selected by the generated app. Prefer `.resolved-environment.json`, then `auth.config.json.environment`, then `power.config.json` + resolver:
```bash
@@ -59,6 +61,8 @@ If `TENANT_ID` is empty, stop: environment resolution failed. Do not guess the t
## Step 3 — Open Wrap app-registration page
+**Telemetry checkpoint: `open_wrap_app_registration`**
+
Print the public Power Apps Wrap URL for the active environment:
```text
@@ -91,6 +95,8 @@ Paste the Entra ID app registration client ID for tenant <tenant-guid> (GUID for
## Step 5 — Write `auth.config.json`
+**Telemetry checkpoint: `write_native_auth_configuration`**
+
Update `auth.config.json`:
- `msal.clientId` = pasted client ID
- `msal.tenantId` = resolved tenant ID from Step 2
@@ -120,6 +126,8 @@ Do not touch `src/playerConfig.ts`; auth identifiers live in `auth.config.json`
## Step 6 — Validate JSON
+**Telemetry checkpoint: `validate_native_auth_configuration`**
+
```bash
node -e "JSON.parse(require('fs').readFileSync('auth.config.json','utf8')); console.log('auth.config.json OK')"
```
diff --git a/plugins/mobile-apps/skills/setup-datamodel/SKILL.md b/plugins/mobile-apps/skills/setup-datamodel/SKILL.md
index 9e29a1bb8..9fec7d5da 100644
--- a/plugins/mobile-apps/skills/setup-datamodel/SKILL.md
+++ b/plugins/mobile-apps/skills/setup-datamodel/SKILL.md
@@ -37,6 +37,8 @@ Capture the **environment URL**, **environment ID**, **tenant ID**, and **organi
### Phase 2 — Design Data Model
+**Telemetry checkpoint: `design_dataverse_schema`**
+
Check `$ARGUMENTS` for diagram hints first (`*.png`, `*.jpg`, `erDiagram` keyword, `||--o{` cardinality syntax). If a hint is present → Path A. If `$ARGUMENTS` describes the app at all → silently take Path B (architect propose). Only if both are empty, ask:
> "How would you like to define the data model?"
@@ -93,6 +95,8 @@ Write `## Data Model` as "None — no Dataverse tables needed." Continue to Phas
### Phase 3 — Plan Connectors
+**Telemetry checkpoint: `plan_connector_integrations`**
+
Follow [`shared/references/connector-planning.md`](${PLUGIN_ROOT}/shared/references/connector-planning.md):
1. **Infer** — if `$ARGUMENTS` describes what the app does, scan for connector keywords. Build a candidate list.
@@ -105,6 +109,8 @@ If the user provided no requirements context, ask:
### Phase 4 — Combined Approval
+**Telemetry checkpoint: `approve_data_model_and_connectors`**
+
Present the full plan — data model + connectors — together in a single `EnterPlanMode` block:
```
@@ -127,6 +133,8 @@ Approve both to proceed with execution?
### Phase 5 — Execute Data Model
+**Telemetry checkpoint: `apply_dataverse_schema`**
+
Invoke `/add-dataverse` with `--skip-planning` so it reads the approved plan directly without re-prompting:
```
@@ -151,6 +159,8 @@ Skip if Phase 2 chose Path C (no Dataverse).
### Phase 6 — Execute Connectors
+**Telemetry checkpoint: `generate_connector_data_sources`**
+
Read `## Connectors` from `native-app-plan.md`. For each connector row, invoke `/add-connector`:
```
@@ -165,6 +175,8 @@ Run sequentially. Skip if `## Connectors` is "None".
### Phase 6.5 — Offline profile reconciliation
+**Telemetry checkpoint: `reconcile_offline_profile`**
+
If Phase 5 created or extended Dataverse tables, an existing Mobile Offline Profile may now be missing those tables/columns. Because Phase 5 invoked `/add-dataverse` with `--skip-planning` (which suppresses that skill's own Step 8.5 reconciliation), this orchestrator owns the check. Skip when Phase 2 chose Path C (no Dataverse).
Run the local, no-network delta check:
diff --git a/plugins/mobile-apps/skills/setup-offline-profile/SKILL.md b/plugins/mobile-apps/skills/setup-offline-profile/SKILL.md
index a3a2ad1e0..a318f1d63 100644
--- a/plugins/mobile-apps/skills/setup-offline-profile/SKILL.md
+++ b/plugins/mobile-apps/skills/setup-offline-profile/SKILL.md
@@ -119,6 +119,8 @@ Read `memory-bank.md` `## Offline profile` block. Decide based on `status`:
### Step 2 — Resolve mode (create vs extend vs reconcile)
+**Telemetry checkpoint: `resolve_offline_profile_mode`**
+
**Print before starting:**
> "→ Checking for existing offline profiles in the environment…"
@@ -144,6 +146,8 @@ Decision tree — evaluate in order:
### Step 3 — Spawn architect agent
+**Telemetry checkpoint: `design_offline_profile_scope`**
+
**Print before starting:**
> "→ Spawning mobile-app:offline-profile-architect agent (read-only) to design the profile…"
@@ -168,6 +172,8 @@ The agent returns `_offline_section.md` in the working directory. Read it. Parse
### Step 3.5 — Configuration review (interactive AskUserQuestion flow)
+**Telemetry checkpoint: `review_offline_profile_configuration`**
+
**Print before starting:**
> "→ Presenting the proposed offline profile configuration. You'll tap an option to accept, adjust, or cancel — no need to type."
@@ -318,6 +324,8 @@ configReview: accepted
### Step 4 — Run the internal `enable-tables-offline` workflow if needed
+**Telemetry checkpoint: `enable_dataverse_tables_offline`**
+
If Gate 1 identified any table needing change, read and execute `${PLUGIN_ROOT}/skills/enable-tables-offline/SKILL.md` with the table list as its `$ARGUMENTS`:
```text
@@ -332,6 +340,8 @@ If all tables were already enabled, skip this step.
### Step 5 — POST profile shell
+**Telemetry checkpoint: `create_offline_profile_shell`**
+
**Print before starting:**
> "→ Creating MobileOfflineProfile record (Name + Description only)…"
@@ -366,6 +376,8 @@ gate1: approved
### Step 6 — POST profile items
+**Telemetry checkpoint: `add_tables_to_offline_profile`**
+
**Print before starting:**
> "→ Creating <N> MobileOfflineProfileItem records (one per table, sequential)…"
@@ -400,6 +412,8 @@ Print `✓ <table>` after each 2xx.
### Step 7 — POST associations + PATCH selectedcolumns
+**Telemetry checkpoint: `configure_offline_profile_associations`**
+
**Print before starting:**
> "→ Creating association rows + PATCHing selectedcolumns on each profile item…"
@@ -459,6 +473,8 @@ If syncintervalinminutes was edited at Gate 3, include it in the same PATCH.
### Step 8 — Publish
+**Telemetry checkpoint: `publish_offline_profile`**
+
**Print before starting:**
> "→ Publishing profile (targeted PublishXml)…"
@@ -511,6 +527,8 @@ After confirmed success, re-GET the profile and check `publishedon` for the arti
### Step 9 — Persist artifacts
+**Telemetry checkpoint: `persist_offline_profile_snapshot`**
+
**Print before starting:**
> "→ Writing offline-profile.json + memory-bank.md…"
@@ -630,6 +648,8 @@ associationsCount: <M>
### Step 9.5 — Verify
+**Telemetry checkpoint: `verify_published_offline_profile`**
+
**Print before starting:**
> "→ Verifying the on-server profile matches offline-profile.json…"