[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M699PF54PBHV98XSBYM3V087":3,"skill-same:01M699PF54PBHV98XSBYM3V087":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":62,"ownerHtmlUrl":63,"ownerBlogUrl":64,"ownerDescription":65,"updatedAt":66,"install":67,"resources":79},"01M699PF54PBHV98XSBYM3V087","setup-datamodel",null,"Use when the user wants to design or redesign the Dataverse schema and connector plan for an existing mobile app, or has an ER diagram (image, Mermaid, or text) to apply. Skip when the user is creating a brand-new app — \u002Fcreate-mobile-app handles the data model inline.","microsoft\u002Fpower-platform-skills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M699JVYJFB75D9JM70BN4H0Q",1149,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmobile-apps\u002Fskills\u002Fsetup-datamodel\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"setup datamodel","setup","datamodel","text","new","when","inline","app","Connector","read","redesign","model","design","plan","Bash","create","mermaid","diagram","dataverse","image","2026-11-10 10:12:30",false,"---\nname: setup-datamodel\ndescription: Use when the user wants to design or redesign the Dataverse schema and connector plan for an existing mobile app, or has an ER diagram (image, Mermaid, or text) to apply. Skip when the user is creating a brand-new app — \u002Fcreate-mobile-app handles the data model inline.\nuser-invocable: true\nallowed-tools: Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion, EnterPlanMode, ExitPlanMode, Task, Skill\nmodel: opus\n---\n\n> **Plugin check**: Run `node \"${PLUGIN_ROOT}\u002Fscripts\u002Fcheck-version.js\"` - if it outputs a message, show it to the user before proceeding.\n\n**? Shared instructions: [shared-instructions.md](${PLUGIN_ROOT}\u002Fshared\u002Fshared-instructions.md)** — read first.\n\n# Set Up Data Model + Connectors\n\n**Entry routing:** use the shared [App feature entry points](..\u002F..\u002Fshared\u002Fshared-instructions.md#app-feature-entry-points)\npreflight before the workflow below.\n\n**Invocation scope:** follow [Data-source invocation scope](..\u002F..\u002Fshared\u002Fshared-instructions.md#data-source-invocation-scope)\nbefore any project read or the workflow below.\n\nThis standalone data-only workflow does not require a complete app plan.\nIt proposes and approves only the current schema\u002Fconnector delta; preserve\nexisting app sections without invoking full-app planning or screen generation.\nWhen called by an owner, retain its explicit current request, absolute root,\nphase, and scope, and return proposals or verified results to that owner.\n\nCombined orchestrator for standalone data source planning. Designs the Dataverse schema, plans connectors, gets approval on both, then delegates execution to `\u002Fadd-dataverse` and `\u002Fadd-connector`.\n\n| Use this skill when | Use `\u002Fadd-dataverse` directly when |\n|---|---|\n| Standalone schema + connector design (initialized app; data plan optional) | The plan already exists and you just need to apply tables + generate services |\n| You have an existing ER diagram (image \u002F Mermaid \u002F text) to import | `\u002Fcreate-mobile-app` is invoking this as a sub-step with approved scoped context |\n| Re-planning the schema or connectors mid-project | You only need to add a single table or a single connector |\n\n## Workflow\n\n1. Resolve project root & verify auth → 2. Design data model → 3. Plan connectors → 4. Combined approval → 5. Execute additions\u002Frefreshes → 6. Execute connectors → 6.25 Retire approved bindings → 6.5 Reconcile offline profile → 7. Reconcile inventory & summarize\n\n---\n\n### Phase 1 — Verify Project & Auth\n\nResolve one absolute `working_dir` before reading project files or discovering\nthe environment:\n\n- For a nested call, inherit the owner's absolute `working_dir`. If\n  `--working-dir` is also supplied, both must resolve to the same directory;\n  a mismatch returns `NEEDS_CONTEXT` before any project or cloud work.\n- For a direct call, resolve an explicit `--working-dir` against the invocation\n  directory. Only a direct call without an override may use that invocation\n  directory as its project root.\n- Require the selected directory to exist, normalize it to one absolute path,\n  and retain it for this invocation. A missing nested owner path is an error:\n  never fall back to the shell's current directory or search neighboring apps.\n\nAll relative app paths below, including diagram inputs, `native-app-plan.md`,\n`_dm_section.md`, `.datamodel-manifest.json`, `offline-profile.json`, and\n`memory-bank.md`, are relative to this resolved root, not a later tool's cwd.\nUse absolute paths with file tools. Begin every shell invocation that reads or\nwrites app-local files with the single-quoted fail-closed app-root guard; shell state does not\ncarry across tool calls.\n\nConfirm the selected root is a Power Apps mobile app:\n\nFor `--plan-only` or a planning-phase handoff, perform the file\u002Fenvironment\nchecks read-only and use the shared proposal-only environment-context rule.\nThe same non-persisting lookup is used before approval in a normal invocation.\nIncomplete or conflicting context returns `NEEDS_CONTEXT` after read-only\nrecovery; never retry without the safety flags or redirect into app configuration.\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nif [ ! -f power.config.json ] || [ ! -f app.config.js ]; then\n  printf '%s\\n' 'ERROR: selected working directory is not an initialized mobile app' >&2\n  exit 1\nfi\nenvironment_id=\"$(node -p \"require('.\u002Fpower.config.json').environmentId || ''\")\" || exit 1\nif [ -z \"$environment_id\" ]; then\n  printf '%s\\n' 'ERROR: selected app has no environmentId' >&2\n  exit 1\nfi\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fresolve-environment.js\" \"$environment_id\" --no-cache --require-tenant\n```\n\nStop on failure; do not switch directories or re-scaffold. Capture the\n**environment URL**, **environment ID**, and **tenant ID**\nfor this root for Phase 5. Pass this same absolute root in every planner\u002Fskill\nhandoff and on retries.\n\n### Phase 2 — Design Data Model\n\n**Telemetry checkpoint: `design_dataverse_schema`**\n\nCheck whether the request needs Dataverse schema first; connector-only requests\ntake Path C. Otherwise check `$ARGUMENTS` for diagram hints (`*.png`, `*.jpg`,\n`erDiagram`, `||--o{`). If present, take Path A. If a Dataverse requirement is\nalready supplied, take Path B for a read-only proposal. If the choice is still\nunknown, ask:\n\n> \"How would you like to define the data model?\"\n\n| Option | What happens |\n|---|---|\n| Upload an existing ER diagram | Provide a PNG\u002FJPG path, Mermaid block, or text description |\n| Let the Data Model Architect propose one (default) | Spawns `data-model-architect` agent to infer from requirements |\n| Skip — no Dataverse tables needed | Jump to Phase 3 |\n\nRecommend \"architect propose\" only when Dataverse schema is needed. Connector-only\nrequirements take Path C without inventing Dataverse tables. Empty\u002Fcancel input\ndoes not approve a choice; wait for an answer or stop.\n\nFor Paths A and B, read and execute\n[dataverse-change-planning.md](..\u002F..\u002Fshared\u002Freferences\u002Fdataverse-change-planning.md).\nThe foreground owns scoped discovery, compact-evidence validation, and recovery;\npass `Dataverse planning mode: required` to the architect, never the legacy\nlive-discovery path. Preserve the current request, absolute root, and\nproposal-only mode through every handoff. Path C, removal-only work, and a\nretained-service-only refresh skip schema planning and its artifacts.\n\n#### Artifact storage rules for PDFs and signatures\n\nWhen requirements mention signatures, sign-off, ink, drawings, generated PDFs, exported reports, evidence packets, or retained documents, make the storage target explicit in `## Data Model` before approval:\n\n| User signal | Dataverse model implication |\n|---|---|\n| \"capture signature\", \"sign off\", \"approval signature\", \"ink\" | Ask whether retention is needed; only when Dataverse retention is selected, reuse or propose an Image\u002FFile column or child Evidence\u002FSignature table |\n| \"generate PDF\", \"export report\", \"evidence packet\", \"certificate PDF\" | Ask whether the generated PDF should be retained. If yes, use a Dataverse File column, usually on the parent record or a child Evidence\u002FAttachment table. If no, document on-device\u002Fshare-only behavior and add no column. |\n| \"upload PDF\", \"attach file\", \"import document\" | File column or child Attachment table with lookup to parent |\n| \"view PDF\" | Store or reference an HTTPS URL if the app has a durable source. Native PDF viewer 0.2.9+ also supports local `file:\u002F\u002F` URIs; `content:\u002F\u002F`, `blob:`, and `http:\u002F\u002F` remain unsupported. |\n\nPDF content must never be modeled as long text\u002Fbase64 text. Use Dataverse File columns for retained PDFs. Signature PNGs may use Image columns when the generated service supports image payloads; use File columns or child Evidence rows when the capture should behave like an attachment.\n\n#### Path A — Parse user-provided diagram\n\nAccept PNG\u002FJPG (use `Read` to view), Mermaid syntax (paste in chat), or text\ndescription. Parse tables, columns, and relationships as requested intent.\nUse the shared compact-evidence workflow to draft `_dm_section.md` and the\nnormalized `.tmp\u002Fdataverse-schema-contract.json`; diagram names alone do not\nprove existing schema. Run the same decision validation as Path B before the\ncombined Phase 4 approval; do not update the live plan yet.\n\n#### Path B — Spawn data-model-architect\n\n```\nTask: mobile-app:data-model-architect\n\nPrompt:\n  You are the data-model-architect agent for a Power Apps mobile app.\n  Requirements: \u003C$ARGUMENTS or ask the user what the app does>\n  Working directory: \u003Cworking_dir>\n  Output proposal: \u003Cworking_dir>\u002F_dm_section.md\n  Plugin root: ${PLUGIN_ROOT}\n  Phase: planning\n  Proposal only: \u003Ctrue for --plan-only or a planning-phase caller>\n  Dataverse planning mode: required\n  Normalized Dataverse foreground planning snapshot (validator input only): \u003CSNAPSHOT_PATH>\n  Compact Dataverse architect evidence: \u003CARCHITECT_EVIDENCE_PATH>\n  Structured schema contract output: \u003Cworking_dir>\u002F.tmp\u002Fdataverse-schema-contract.json\n  Scope: \u003Ccurrent requested delta and necessary dependencies; unrelated rows are context only>\n  Native capabilities and connector ownership: \u003Cretained approved constraints>\n\n  Follow your snapshot-only path. Return a ## Data Model section with Mermaid ER diagram,\n  reuse\u002Fextend\u002Fcreate table, and dependency-tier ordering. If requirements mention\n  signatures, pen\u002Fink, generated PDFs, report exports, evidence packets, or uploaded\n  documents, include the artifact storage target: on-device\u002Fshare-only, Dataverse\n  Image column, Dataverse File column, or child Evidence\u002FAttachment table. Retained\n  PDF content must use a File column, not long text\u002Fbase64.\n```\n\nHandle structured Dataverse signals through the shared planning recovery before\nthe generic `AGENTS.md` return protocol. Require both the section and normalized\ncontract, then run the shared decision gate even for `DONE`\u002F`DONE_WITH_CONCERNS`.\nIf agents are unavailable, draft both artifacts inline from the same compact\nevidence and run the same validation. Keep the result as a proposal for Phase 4;\nstop on an unresolved blocker rather than treating the proposal as approved.\n\n#### Path C — No Dataverse\n\nPropose no Dataverse changes. Preserve any existing Data Model section; only use\n\"None — no Dataverse tables needed\" when the project has no Dataverse model.\nContinue to Phase 3 without overwriting the plan.\n\n### Phase 3 — Plan Connectors\n\n**Telemetry checkpoint: `plan_connector_integrations`**\n\nFollow [`shared\u002Freferences\u002Fconnector-planning.md`](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Fconnector-planning.md):\n\n1. **Infer** — if `$ARGUMENTS` describes what the app does, scan for connector keywords. Build a candidate list.\n2. **Confirm** — present via `AskUserQuestion`. Let the user add, remove, or confirm.\n3. **Record** — build the `## Connectors` section.\n\nIf the user provided no requirements context, ask:\n\n> \"What does your app need to connect to? (e.g. SharePoint, Teams, email, Excel, OneDrive, Azure DevOps — or none)\"\n\n### Phase 4 — Combined Approval\n\n**Telemetry checkpoint: `approve_data_model_and_connectors`**\n\nFor an existing data-only plan, compare current bindings with the proposal before\nwriting it. Apply [data-source-removal.md](..\u002F..\u002Fshared\u002Freferences\u002Fdata-source-removal.md)\nto classify and approve removals explicitly. Omitted tables are not automatic\ndeletions; retain anything required by existing consumers. Report their required\nchanges separately; the user may request existing `\u002Fedit-app` for consumer work,\nbut this workflow does not invoke it automatically.\n\nFor a Dataverse proposal from any path, require the current normalized contract\nand snapshot to pass `validate-dataverse-planning-decisions.js` with exit `0`\nbefore this gate. Revisions repeat validation, not broad discovery or another\napproval ceremony. Connector-only, retirement-only, and refresh-only proposals\nkeep their own checks and must not reuse stale schema-planning artifacts.\n\n**Proposal-only exit:** if `--plan-only` is present or the caller's phase is\nplanning, present the proposed Data Model, Connectors, and retirement\u002Foffline\nimpact, then return to the caller and STOP before the execution approval below.\nDo not save `native-app-plan.md`, mint approval receipts, update the materialized\nmanifest, or invoke Phases 5–7. A scratch proposal is not an applied plan.\nApproval to review the proposal does not override `--plan-only`; implementation\nrequires a separate request without that flag and approval of its exact delta.\n\nPresent the full plan for this data-source delta — data model + connectors —\ntogether in a single `EnterPlanMode` block. Distinguish retained context from\nadditions, refreshes, and explicitly approved retirements. A current\nimplementation-phase owner may supply the exact data approval instead; validate\nthat it matches this proposal and return scope changes to that owner before\nwriting. A saved plan or `--skip-planning` alone is not approval.\n\n```\n## Plan: Data Sources\n\n### Data Model\n[reuse\u002Fextend\u002Fcreate table]\n[Mermaid ER diagram]\n[creation order tiers]\n\n### Connectors\n[connector table or \"None\"]\n\nApprove both to proceed with execution?\n```\n\n- **Approved** → save both approved sections to `native-app-plan.md`, preserving\n  unrelated sections, then proceed to Phase 5. This applies to every Phase 2 path,\n  including architect output and connector-only plans.\n- **Change data model** → loop back to Phase 2 for that section only, then re-present Phase 4\n- **Change connectors** → loop back to Phase 3, then re-present Phase 4\n- **Cancel** → stop without applying the proposed plan or data-source mutations.\n\nSave the accepted proposal into `\u003Cworking_dir>\u002Fnative-app-plan.md`; scratch\n`_dm_section.md` is not a second source of truth. Do not reuse operation manifests\nor approval receipts bound to the previous plan. The verified materialized\nmanifest is updated after execution\u002Fverification, not by copying proposed rows.\nFor approved Dataverse implementation, retain the shared planning paths and\nfreeze the accepted `contract_sha256` and saved `plan_sha256` in\n`approved_scope`. This is not a create-flow receipt and does not grant unrelated\nnative, connector, or screen approvals.\n\n### Phase 5 — Execute Data Model\n\n**Telemetry checkpoint: `apply_dataverse_schema`**\n\nInvoke `\u002Fadd-dataverse` with `--skip-planning` so it reads the approved plan directly without re-prompting:\n\nApply only additions\u002Frefreshes here. Skip this phase for a removal-only delta;\napproved retirements have their own Phase 6.25 handoff.\n\nFor a service-only refresh of an already registered table, use the leaf's\n`--refresh --data-source-name \"\u003Cregistered-name>\"` branch and pass its exact\nregistered identity in `approved_scope`; do not execute the schema-add handoff\nbelow for that row. For schema changes, retain the normal handoff below.\n\n```\nInvoke skill: \u002Fadd-dataverse\n\nContext:\n  MOBILE_APP_ORCHESTRATING=1\n  orchestrator: setup-datamodel\n  working_dir: \u003Cworking_dir>\n  phase: implementation\n  offline_reconciliation_owner: setup-datamodel\n  planning_snapshot: \u003CSNAPSHOT_PATH>\n  architect_evidence: \u003CARCHITECT_EVIDENCE_PATH>\n  schema_contract: \u003Cworking_dir>\u002F.tmp\u002Fdataverse-schema-contract.json\n  approved_scope: \u003Capproved Data Model delta and answers, contract_sha256, plan_sha256>\n\nArguments:\n  --working-dir '\u003Cworking_dir>'\n  --plan-section '\u003Cworking_dir>\u002Fnative-app-plan.md#data-model'\n  --skip-planning\n```\n\n`\u002Fadd-dataverse` creates tables in tier order within this scope, adds only\napproved missing bindings or refreshes approved retained services, publishes\ncustomizations when needed, writes `.datamodel-manifest.json`, and type-checks.\nIt validates the scoped planning context and performs fresh live reconciliation;\ndo not send partial create-only fast-path flags. Wait for it to return before\nPhase 6.\n\n**Cross-entity reads from the screen plan** — the approved\n`### Cross-entity Reads` subsection contains formatted lookups, bounded chained\nfetches, or `external-projection-required` blockers. `\u002Fadd-dataverse` never\nsynthesizes calculated\u002Fformula definitions through code. A user-supplied,\nmaker-created computed column is validated as an existing dependency during\nreconciliation before it can be reused.\n\nSkip if Phase 2 chose Path C (no Dataverse).\n\n### Phase 6 — Execute Connectors\n\n**Telemetry checkpoint: `generate_connector_data_sources`**\n\nRead `## Connectors` from `native-app-plan.md`. For each approved added\u002Frefreshed\nconnector row (not retained or retiring rows), invoke `\u002Fadd-connector`:\n\nSeparate the operation before dispatch: an added row takes the normal handoff;\na refreshed row adds `--refresh --data-source-name \"\u003Cregistered-name>\"` and\nincludes the verified API\u002Fdataset\u002Fconnection identity in `approved_scope`.\nDo not infer the registered name from the connector display label. The refresh\nbranch must return without connection creation or `add-data-source`.\n\n**Added source only:**\n\n```\nInvoke skill: \u002Fadd-connector\n\nContext:\n  MOBILE_APP_ORCHESTRATING=1\n  orchestrator: setup-datamodel\n  working_dir: \u003Cworking_dir>\n  phase: implementation\n  approved_scope: \u003Capproved connector row and answers>\n\nArguments:\n  --working-dir '\u003Cworking_dir>'\n  --connector \u003Capi-name>\n```\n\n**Retained-source refresh only:** use this separate handoff, never the add block.\n\n```text\nInvoke skill: \u002Fadd-connector\n\nContext:\n  MOBILE_APP_ORCHESTRATING=1\n  orchestrator: setup-datamodel\n  working_dir: \u003Cworking_dir>\n  phase: implementation\n  approved_scope: \u003Crefresh operation, exact registered name, verified API\u002Fdataset\u002Fresource and connection ID\u002Freference>\n\nArguments:\n  --working-dir '\u003Cworking_dir>'\n  --connector \u003Cverified-api-id>\n  --refresh\n  --data-source-name \"\u003Cregistered-name>\"\n```\n\nRun sequentially. Skip if `## Connectors` is \"None\".\n\n### Phase 6.25 — Retire unused app bindings\n\nFor each explicitly approved retirement, invoke the matching leaf with\n`--remove`, `MOBILE_APP_ORCHESTRATING=1`, `orchestrator: setup-datamodel`,\n`phase: implementation`, `working_dir: \u003Cworking_dir>`, the argument\n`--working-dir '\u003Cworking_dir>'`, and its `approved_scope`.\nFollow [data-source-removal.md](..\u002F..\u002Fshared\u002Freferences\u002Fdata-source-removal.md).\nThis standalone data-only flow does not edit consumers: if any remain, stop and\nreport their integration work to the user or current owner instead of breaking\nthem. The user may separately request `\u002Fedit-app`; never route there automatically.\nVerify the CLI cleanup and reconcile the actual remaining generated-service\nsnapshot and app manifest before the summary. No retirement set means skip.\nPreserve each leaf's `offlineRetirement` outcome from the shared removal contract,\nincluding unresolved outcomes recorded in memory-bank by an earlier attempt.\nApp-binding cleanup and offline-profile migration have separate completion states.\n\n### Phase 6.5 — Offline profile reconciliation\n\n**Telemetry checkpoint: `reconcile_offline_profile`**\n\nIf Phase 5 created or extended Dataverse tables, an existing Mobile Offline Profile may now be missing those tables\u002Fcolumns. Phase 5 passes a complete scoped handoff with `offline_reconciliation_owner: setup-datamodel`; together with `--skip-planning`, that makes this orchestrator the owner instead of running the leaf's Step 8.5 check twice. The flag alone is not enough. Skip the addition check when Phase 2 chose Path C (no Dataverse), but never discard a recorded `offlineRetirement` outcome.\n\nRun the local, no-network delta check:\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Foffline-profile-delta.js\" --project-root '\u003Cworking_dir>'\n```\n\nCapture the exit status and stdout\u002Fstderr. Before any status dispatch or\nPhase 7 summary, a non-zero exit, `status: error`, missing\u002Fmalformed JSON, or\nunknown status follows the failure path in\n[offline-profile-reconciliation.md](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Foffline-profile-reconciliation.md):\nsurface the error, record `offline_reconciliation: failed` with existing\nretirement outcomes intact, skip mutation helpers, and return\n`DONE_WITH_CONCERNS` for already-applied data changes (otherwise `BLOCKED`).\nDo not claim completed reconciliation or continue to the clean success summary.\n\nFor a valid successful check, branch on the JSON `status`: `no-manifest` \u002F\n`no-profile` \u002F `in-sync` means no addition work; continue to Phase 7 with the\nexisting `offlineRetirement` outcomes unchanged (do not nag when no profile\nexists). For `delta`, obtain offline-update approval, then use the reference's\n**Scoped helper handoffs** with `orchestrator: setup-datamodel`,\n`working_dir: \u003Cworking_dir>`, `phase: implementation`, and the exact approved\nenvironment\u002Fprofile\u002Ftable\u002Ffilter-or-column scope. Pass\n`--working-dir '\u003Cworking_dir>' --table \u003ClogicalName>` to\n`add-table-to-offline-profile` for `missingTables[]`, or those same arguments\nplus `--columns \"add:\u003CnewColumns>\"` to `edit-offline-profile` for\n`tablesWithNewColumns[]`. Re-check to `in-sync` using the same failure path.\nDeclined or incomplete addition work remains a separate concern.\n\nThese offline helpers also inherit the same absolute `working_dir`; no new root\ndiscovery is permitted during reconciliation.\n\n### Phase 7 — Summary\n\nBefore success, reconcile each affected plan section with this project's verified\noutput and refresh the Generated Services snapshot. For Dataverse changes, also\nreconcile `.datamodel-manifest.json`, retaining a valid empty inventory after\nremoving the last Dataverse binding. Connector-only work without Dataverse does\nnot require or create a Dataverse manifest. Record partial execution or unresolved\nremovals in memory-bank and return a non-success status rather than claiming the plan is fully applied.\n\nRender the summary from verified results, not the example's possible artifacts.\nFor connector-only work without a Dataverse inventory, report Data Model and\nManifest as `not applicable`; do not print a nonexistent manifest path. If a\nverified inventory already exists but was untouched, label it `unchanged`.\n\nInclude every affected table's `offlineRetirement` status in memory-bank and the\nfinal response. `pending` returns `DONE_WITH_CONCERNS`, not a clean `DONE`:\n\"App changes completed. The offline profile still includes Orders; deciding\nwhether to retain or remove that coverage is pending.\"\nUse actual table names and verified app results; if app cleanup failed, report\nthat failure instead of claiming completion. `retained` reports the approved\nreason; `reconciled` requires verified profile migration, not an `in-sync` result.\n\n```\n✅ Data sources set up\n─────────────────────────────────────────────\nData model:\n  Tables reused  : \u003Clist>\n  Tables extended: \u003Clist>\n  Tables created : \u003Clist>\n  Manifest      : \u003Cverified manifest path and updated\u002Funchanged status, or \"not applicable\">\n\nConnectors:\n  \u003Clist of added connectors, or \"None\">\n\nGenerated services:\n  src\u002Fgenerated\u002Fservices\u002F × \u003CN>\n  src\u002Fgenerated\u002Fmodels\u002F   × \u003CN>\n\nType-check: PASS\n\nNext steps:\n  \u002Fadd-datasource   — add more data sources\n  \u002Fadd-native       — add device capabilities\n  \u002Fedit-app         — separately request consumer\u002Fscreen changes if needed\n─────────────────────────────────────────────\n```\n\n## Reference\n\n- [shared\u002Freferences\u002Fconnector-planning.md](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Fconnector-planning.md) — connector inference + confirmation logic\n- [shared\u002Freferences\u002Foffline-profile-reconciliation.md](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Foffline-profile-reconciliation.md) — Phase 6.5 offline delta check + reconciliation flow\n- [skills\u002Fadd-dataverse\u002FSKILL.md](..\u002Fadd-dataverse\u002FSKILL.md) — full data model execution workflow\n- [agents\u002Fdata-model-architect.md](..\u002F..\u002Fagents\u002Fdata-model-architect.md) — read-only architect agent\n","> **Plugin check**: Run `node \"${PLUGIN_ROOT}\u002Fscripts\u002Fcheck-version.js\"` - if it outputs a message, show it to the user before proceeding.\n\n**? Shared instructions: [shared-instructions.md](${PLUGIN_ROOT}\u002Fshared\u002Fshared-instructions.md)** — read first.\n\n# Set Up Data Model + Connectors\n\n**Entry routing:** use the shared [App feature entry points](..\u002F..\u002Fshared\u002Fshared-instructions.md#app-feature-entry-points)\npreflight before the workflow below.\n\n**Invocation scope:** follow [Data-source invocation scope](..\u002F..\u002Fshared\u002Fshared-instructions.md#data-source-invocation-scope)\nbefore any project read or the workflow below.\n\nThis standalone data-only workflow does not require a complete app plan.\nIt proposes and approves only the current schema\u002Fconnector delta; preserve\nexisting app sections without invoking full-app planning or screen generation.\nWhen called by an owner, retain its explicit current request, absolute root,\nphase, and scope, and return proposals or verified results to that owner.\n\nCombined orchestrator for standalone data source planning. Designs the Dataverse schema, plans connectors, gets approval on both, then delegates execution to `\u002Fadd-dataverse` and `\u002Fadd-connector`.\n\n| Use this skill when | Use `\u002Fadd-dataverse` directly when |\n|---|---|\n| Standalone schema + connector design (initialized app; data plan optional) | The plan already exists and you just need to apply tables + generate services |\n| You have an existing ER diagram (image \u002F Mermaid \u002F text) to import | `\u002Fcreate-mobile-app` is invoking this as a sub-step with approved scoped context |\n| Re-planning the schema or connectors mid-project | You only need to add a single table or a single connector |\n\n## Workflow\n\n1. Resolve project root & verify auth → 2. Design data model → 3. Plan connectors → 4. Combined approval → 5. Execute additions\u002Frefreshes → 6. Execute connectors → 6.25 Retire approved bindings → 6.5 Reconcile offline profile → 7. Reconcile inventory & summarize\n\n---\n\n### Phase 1 — Verify Project & Auth\n\nResolve one absolute `working_dir` before reading project files or discovering\nthe environment:\n\n- For a nested call, inherit the owner's absolute `working_dir`. If\n  `--working-dir` is also supplied, both must resolve to the same directory;\n  a mismatch returns `NEEDS_CONTEXT` before any project or cloud work.\n- For a direct call, resolve an explicit `--working-dir` against the invocation\n  directory. Only a direct call without an override may use that invocation\n  directory as its project root.\n- Require the selected directory to exist, normalize it to one absolute path,\n  and retain it for this invocation. A missing nested owner path is an error:\n  never fall back to the shell's current directory or search neighboring apps.\n\nAll relative app paths below, including diagram inputs, `native-app-plan.md`,\n`_dm_section.md`, `.datamodel-manifest.json`, `offline-profile.json`, and\n`memory-bank.md`, are relative to this resolved root, not a later tool's cwd.\nUse absolute paths with file tools. Begin every shell invocation that reads or\nwrites app-local files with the single-quoted fail-closed app-root guard; shell state does not\ncarry across tool calls.\n\nConfirm the selected root is a Power Apps mobile app:\n\nFor `--plan-only` or a planning-phase handoff, perform the file\u002Fenvironment\nchecks read-only and use the shared proposal-only environment-context rule.\nThe same non-persisting lookup is used before approval in a normal invocation.\nIncomplete or conflicting context returns `NEEDS_CONTEXT` after read-only\nrecovery; never retry without the safety flags or redirect into app configuration.\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nif [ ! -f power.config.json ] || [ ! -f app.config.js ]; then\n  printf '%s\\n' 'ERROR: selected working directory is not an initialized mobile app' >&2\n  exit 1\nfi\nenvironment_id=\"$(node -p \"require('.\u002Fpower.config.json').environmentId || ''\")\" || exit 1\nif [ -z \"$environment_id\" ]; then\n  printf '%s\\n' 'ERROR: selected app has no environmentId' >&2\n  exit 1\nfi\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fresolve-environment.js\" \"$environment_id\" --no-cache --require-tenant\n```\n\nStop on failure; do not switch directories or re-scaffold. Capture the\n**environment URL**, **environment ID**, and **tenant ID**\nfor this root for Phase 5. Pass this same absolute root in every planner\u002Fskill\nhandoff and on retries.\n\n### Phase 2 — Design Data Model\n\n**Telemetry checkpoint: `design_dataverse_schema`**\n\nCheck whether the request needs Dataverse schema first; connector-only requests\ntake Path C. Otherwise check `$ARGUMENTS` for diagram hints (`*.png`, `*.jpg`,\n`erDiagram`, `||--o{`). If present, take Path A. If a Dataverse requirement is\nalready supplied, take Path B for a read-only proposal. If the choice is still\nunknown, ask:\n\n> \"How would you like to define the data model?\"\n\n| Option | What happens |\n|---|---|\n| Upload an existing ER diagram | Provide a PNG\u002FJPG path, Mermaid block, or text description |\n| Let the Data Model Architect propose one (default) | Spawns `data-model-architect` agent to infer from requirements |\n| Skip — no Dataverse tables needed | Jump to Phase 3 |\n\nRecommend \"architect propose\" only when Dataverse schema is needed. Connector-only\nrequirements take Path C without inventing Dataverse tables. Empty\u002Fcancel input\ndoes not approve a choice; wait for an answer or stop.\n\nFor Paths A and B, read and execute\n[dataverse-change-planning.md](..\u002F..\u002Fshared\u002Freferences\u002Fdataverse-change-planning.md).\nThe foreground owns scoped discovery, compact-evidence validation, and recovery;\npass `Dataverse planning mode: required` to the architect, never the legacy\nlive-discovery path. Preserve the current request, absolute root, and\nproposal-only mode through every handoff. Path C, removal-only work, and a\nretained-service-only refresh skip schema planning and its artifacts.\n\n#### Artifact storage rules for PDFs and signatures\n\nWhen requirements mention signatures, sign-off, ink, drawings, generated PDFs, exported reports, evidence packets, or retained documents, make the storage target explicit in `## Data Model` before approval:\n\n| User signal | Dataverse model implication |\n|---|---|\n| \"capture signature\", \"sign off\", \"approval signature\", \"ink\" | Ask whether retention is needed; only when Dataverse retention is selected, reuse or propose an Image\u002FFile column or child Evidence\u002FSignature table |\n| \"generate PDF\", \"export report\", \"evidence packet\", \"certificate PDF\" | Ask whether the generated PDF should be retained. If yes, use a Dataverse File column, usually on the parent record or a child Evidence\u002FAttachment table. If no, document on-device\u002Fshare-only behavior and add no column. |\n| \"upload PDF\", \"attach file\", \"import document\" | File column or child Attachment table with lookup to parent |\n| \"view PDF\" | Store or reference an HTTPS URL if the app has a durable source. Native PDF viewer 0.2.9+ also supports local `file:\u002F\u002F` URIs; `content:\u002F\u002F`, `blob:`, and `http:\u002F\u002F` remain unsupported. |\n\nPDF content must never be modeled as long text\u002Fbase64 text. Use Dataverse File columns for retained PDFs. Signature PNGs may use Image columns when the generated service supports image payloads; use File columns or child Evidence rows when the capture should behave like an attachment.\n\n#### Path A — Parse user-provided diagram\n\nAccept PNG\u002FJPG (use `Read` to view), Mermaid syntax (paste in chat), or text\ndescription. Parse tables, columns, and relationships as requested intent.\nUse the shared compact-evidence workflow to draft `_dm_section.md` and the\nnormalized `.tmp\u002Fdataverse-schema-contract.json`; diagram names alone do not\nprove existing schema. Run the same decision validation as Path B before the\ncombined Phase 4 approval; do not update the live plan yet.\n\n#### Path B — Spawn data-model-architect\n\n```\nTask: mobile-app:data-model-architect\n\nPrompt:\n  You are the data-model-architect agent for a Power Apps mobile app.\n  Requirements: \u003C$ARGUMENTS or ask the user what the app does>\n  Working directory: \u003Cworking_dir>\n  Output proposal: \u003Cworking_dir>\u002F_dm_section.md\n  Plugin root: ${PLUGIN_ROOT}\n  Phase: planning\n  Proposal only: \u003Ctrue for --plan-only or a planning-phase caller>\n  Dataverse planning mode: required\n  Normalized Dataverse foreground planning snapshot (validator input only): \u003CSNAPSHOT_PATH>\n  Compact Dataverse architect evidence: \u003CARCHITECT_EVIDENCE_PATH>\n  Structured schema contract output: \u003Cworking_dir>\u002F.tmp\u002Fdataverse-schema-contract.json\n  Scope: \u003Ccurrent requested delta and necessary dependencies; unrelated rows are context only>\n  Native capabilities and connector ownership: \u003Cretained approved constraints>\n\n  Follow your snapshot-only path. Return a ## Data Model section with Mermaid ER diagram,\n  reuse\u002Fextend\u002Fcreate table, and dependency-tier ordering. If requirements mention\n  signatures, pen\u002Fink, generated PDFs, report exports, evidence packets, or uploaded\n  documents, include the artifact storage target: on-device\u002Fshare-only, Dataverse\n  Image column, Dataverse File column, or child Evidence\u002FAttachment table. Retained\n  PDF content must use a File column, not long text\u002Fbase64.\n```\n\nHandle structured Dataverse signals through the shared planning recovery before\nthe generic `AGENTS.md` return protocol. Require both the section and normalized\ncontract, then run the shared decision gate even for `DONE`\u002F`DONE_WITH_CONCERNS`.\nIf agents are unavailable, draft both artifacts inline from the same compact\nevidence and run the same validation. Keep the result as a proposal for Phase 4;\nstop on an unresolved blocker rather than treating the proposal as approved.\n\n#### Path C — No Dataverse\n\nPropose no Dataverse changes. Preserve any existing Data Model section; only use\n\"None — no Dataverse tables needed\" when the project has no Dataverse model.\nContinue to Phase 3 without overwriting the plan.\n\n### Phase 3 — Plan Connectors\n\n**Telemetry checkpoint: `plan_connector_integrations`**\n\nFollow [`shared\u002Freferences\u002Fconnector-planning.md`](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Fconnector-planning.md):\n\n1. **Infer** — if `$ARGUMENTS` describes what the app does, scan for connector keywords. Build a candidate list.\n2. **Confirm** — present via `AskUserQuestion`. Let the user add, remove, or confirm.\n3. **Record** — build the `## Connectors` section.\n\nIf the user provided no requirements context, ask:\n\n> \"What does your app need to connect to? (e.g. SharePoint, Teams, email, Excel, OneDrive, Azure DevOps — or none)\"\n\n### Phase 4 — Combined Approval\n\n**Telemetry checkpoint: `approve_data_model_and_connectors`**\n\nFor an existing data-only plan, compare current bindings with the proposal before\nwriting it. Apply [data-source-removal.md](..\u002F..\u002Fshared\u002Freferences\u002Fdata-source-removal.md)\nto classify and approve removals explicitly. Omitted tables are not automatic\ndeletions; retain anything required by existing consumers. Report their required\nchanges separately; the user may request existing `\u002Fedit-app` for consumer work,\nbut this workflow does not invoke it automatically.\n\nFor a Dataverse proposal from any path, require the current normalized contract\nand snapshot to pass `validate-dataverse-planning-decisions.js` with exit `0`\nbefore this gate. Revisions repeat validation, not broad discovery or another\napproval ceremony. Connector-only, retirement-only, and refresh-only proposals\nkeep their own checks and must not reuse stale schema-planning artifacts.\n\n**Proposal-only exit:** if `--plan-only` is present or the caller's phase is\nplanning, present the proposed Data Model, Connectors, and retirement\u002Foffline\nimpact, then return to the caller and STOP before the execution approval below.\nDo not save `native-app-plan.md`, mint approval receipts, update the materialized\nmanifest, or invoke Phases 5–7. A scratch proposal is not an applied plan.\nApproval to review the proposal does not override `--plan-only`; implementation\nrequires a separate request without that flag and approval of its exact delta.\n\nPresent the full plan for this data-source delta — data model + connectors —\ntogether in a single `EnterPlanMode` block. Distinguish retained context from\nadditions, refreshes, and explicitly approved retirements. A current\nimplementation-phase owner may supply the exact data approval instead; validate\nthat it matches this proposal and return scope changes to that owner before\nwriting. A saved plan or `--skip-planning` alone is not approval.\n\n```\n## Plan: Data Sources\n\n### Data Model\n[reuse\u002Fextend\u002Fcreate table]\n[Mermaid ER diagram]\n[creation order tiers]\n\n### Connectors\n[connector table or \"None\"]\n\nApprove both to proceed with execution?\n```\n\n- **Approved** → save both approved sections to `native-app-plan.md`, preserving\n  unrelated sections, then proceed to Phase 5. This applies to every Phase 2 path,\n  including architect output and connector-only plans.\n- **Change data model** → loop back to Phase 2 for that section only, then re-present Phase 4\n- **Change connectors** → loop back to Phase 3, then re-present Phase 4\n- **Cancel** → stop without applying the proposed plan or data-source mutations.\n\nSave the accepted proposal into `\u003Cworking_dir>\u002Fnative-app-plan.md`; scratch\n`_dm_section.md` is not a second source of truth. Do not reuse operation manifests\nor approval receipts bound to the previous plan. The verified materialized\nmanifest is updated after execution\u002Fverification, not by copying proposed rows.\nFor approved Dataverse implementation, retain the shared planning paths and\nfreeze the accepted `contract_sha256` and saved `plan_sha256` in\n`approved_scope`. This is not a create-flow receipt and does not grant unrelated\nnative, connector, or screen approvals.\n\n### Phase 5 — Execute Data Model\n\n**Telemetry checkpoint: `apply_dataverse_schema`**\n\nInvoke `\u002Fadd-dataverse` with `--skip-planning` so it reads the approved plan directly without re-prompting:\n\nApply only additions\u002Frefreshes here. Skip this phase for a removal-only delta;\napproved retirements have their own Phase 6.25 handoff.\n\nFor a service-only refresh of an already registered table, use the leaf's\n`--refresh --data-source-name \"\u003Cregistered-name>\"` branch and pass its exact\nregistered identity in `approved_scope`; do not execute the schema-add handoff\nbelow for that row. For schema changes, retain the normal handoff below.\n\n```\nInvoke skill: \u002Fadd-dataverse\n\nContext:\n  MOBILE_APP_ORCHESTRATING=1\n  orchestrator: setup-datamodel\n  working_dir: \u003Cworking_dir>\n  phase: implementation\n  offline_reconciliation_owner: setup-datamodel\n  planning_snapshot: \u003CSNAPSHOT_PATH>\n  architect_evidence: \u003CARCHITECT_EVIDENCE_PATH>\n  schema_contract: \u003Cworking_dir>\u002F.tmp\u002Fdataverse-schema-contract.json\n  approved_scope: \u003Capproved Data Model delta and answers, contract_sha256, plan_sha256>\n\nArguments:\n  --working-dir '\u003Cworking_dir>'\n  --plan-section '\u003Cworking_dir>\u002Fnative-app-plan.md#data-model'\n  --skip-planning\n```\n\n`\u002Fadd-dataverse` creates tables in tier order within this scope, adds only\napproved missing bindings or refreshes approved retained services, publishes\ncustomizations when needed, writes `.datamodel-manifest.json`, and type-checks.\nIt validates the scoped planning context and performs fresh live reconciliation;\ndo not send partial create-only fast-path flags. Wait for it to return before\nPhase 6.\n\n**Cross-entity reads from the screen plan** — the approved\n`### Cross-entity Reads` subsection contains formatted lookups, bounded chained\nfetches, or `external-projection-required` blockers. `\u002Fadd-dataverse` never\nsynthesizes calculated\u002Fformula definitions through code. A user-supplied,\nmaker-created computed column is validated as an existing dependency during\nreconciliation before it can be reused.\n\nSkip if Phase 2 chose Path C (no Dataverse).\n\n### Phase 6 — Execute Connectors\n\n**Telemetry checkpoint: `generate_connector_data_sources`**\n\nRead `## Connectors` from `native-app-plan.md`. For each approved added\u002Frefreshed\nconnector row (not retained or retiring rows), invoke `\u002Fadd-connector`:\n\nSeparate the operation before dispatch: an added row takes the normal handoff;\na refreshed row adds `--refresh --data-source-name \"\u003Cregistered-name>\"` and\nincludes the verified API\u002Fdataset\u002Fconnection identity in `approved_scope`.\nDo not infer the registered name from the connector display label. The refresh\nbranch must return without connection creation or `add-data-source`.\n\n**Added source only:**\n\n```\nInvoke skill: \u002Fadd-connector\n\nContext:\n  MOBILE_APP_ORCHESTRATING=1\n  orchestrator: setup-datamodel\n  working_dir: \u003Cworking_dir>\n  phase: implementation\n  approved_scope: \u003Capproved connector row and answers>\n\nArguments:\n  --working-dir '\u003Cworking_dir>'\n  --connector \u003Capi-name>\n```\n\n**Retained-source refresh only:** use this separate handoff, never the add block.\n\n```text\nInvoke skill: \u002Fadd-connector\n\nContext:\n  MOBILE_APP_ORCHESTRATING=1\n  orchestrator: setup-datamodel\n  working_dir: \u003Cworking_dir>\n  phase: implementation\n  approved_scope: \u003Crefresh operation, exact registered name, verified API\u002Fdataset\u002Fresource and connection ID\u002Freference>\n\nArguments:\n  --working-dir '\u003Cworking_dir>'\n  --connector \u003Cverified-api-id>\n  --refresh\n  --data-source-name \"\u003Cregistered-name>\"\n```\n\nRun sequentially. Skip if `## Connectors` is \"None\".\n\n### Phase 6.25 — Retire unused app bindings\n\nFor each explicitly approved retirement, invoke the matching leaf with\n`--remove`, `MOBILE_APP_ORCHESTRATING=1`, `orchestrator: setup-datamodel`,\n`phase: implementation`, `working_dir: \u003Cworking_dir>`, the argument\n`--working-dir '\u003Cworking_dir>'`, and its `approved_scope`.\nFollow [data-source-removal.md](..\u002F..\u002Fshared\u002Freferences\u002Fdata-source-removal.md).\nThis standalone data-only flow does not edit consumers: if any remain, stop and\nreport their integration work to the user or current owner instead of breaking\nthem. The user may separately request `\u002Fedit-app`; never route there automatically.\nVerify the CLI cleanup and reconcile the actual remaining generated-service\nsnapshot and app manifest before the summary. No retirement set means skip.\nPreserve each leaf's `offlineRetirement` outcome from the shared removal contract,\nincluding unresolved outcomes recorded in memory-bank by an earlier attempt.\nApp-binding cleanup and offline-profile migration have separate completion states.\n\n### Phase 6.5 — Offline profile reconciliation\n\n**Telemetry checkpoint: `reconcile_offline_profile`**\n\nIf Phase 5 created or extended Dataverse tables, an existing Mobile Offline Profile may now be missing those tables\u002Fcolumns. Phase 5 passes a complete scoped handoff with `offline_reconciliation_owner: setup-datamodel`; together with `--skip-planning`, that makes this orchestrator the owner instead of running the leaf's Step 8.5 check twice. The flag alone is not enough. Skip the addition check when Phase 2 chose Path C (no Dataverse), but never discard a recorded `offlineRetirement` outcome.\n\nRun the local, no-network delta check:\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Foffline-profile-delta.js\" --project-root '\u003Cworking_dir>'\n```\n\nCapture the exit status and stdout\u002Fstderr. Before any status dispatch or\nPhase 7 summary, a non-zero exit, `status: error`, missing\u002Fmalformed JSON, or\nunknown status follows the failure path in\n[offline-profile-reconciliation.md](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Foffline-profile-reconciliation.md):\nsurface the error, record `offline_reconciliation: failed` with existing\nretirement outcomes intact, skip mutation helpers, and return\n`DONE_WITH_CONCERNS` for already-applied data changes (otherwise `BLOCKED`).\nDo not claim completed reconciliation or continue to the clean success summary.\n\nFor a valid successful check, branch on the JSON `status`: `no-manifest` \u002F\n`no-profile` \u002F `in-sync` means no addition work; continue to Phase 7 with the\nexisting `offlineRetirement` outcomes unchanged (do not nag when no profile\nexists). For `delta`, obtain offline-update approval, then use the reference's\n**Scoped helper handoffs** with `orchestrator: setup-datamodel`,\n`working_dir: \u003Cworking_dir>`, `phase: implementation`, and the exact approved\nenvironment\u002Fprofile\u002Ftable\u002Ffilter-or-column scope. Pass\n`--working-dir '\u003Cworking_dir>' --table \u003ClogicalName>` to\n`add-table-to-offline-profile` for `missingTables[]`, or those same arguments\nplus `--columns \"add:\u003CnewColumns>\"` to `edit-offline-profile` for\n`tablesWithNewColumns[]`. Re-check to `in-sync` using the same failure path.\nDeclined or incomplete addition work remains a separate concern.\n\nThese offline helpers also inherit the same absolute `working_dir`; no new root\ndiscovery is permitted during reconciliation.\n\n### Phase 7 — Summary\n\nBefore success, reconcile each affected plan section with this project's verified\noutput and refresh the Generated Services snapshot. For Dataverse changes, also\nreconcile `.datamodel-manifest.json`, retaining a valid empty inventory after\nremoving the last Dataverse binding. Connector-only work without Dataverse does\nnot require or create a Dataverse manifest. Record partial execution or unresolved\nremovals in memory-bank and return a non-success status rather than claiming the plan is fully applied.\n\nRender the summary from verified results, not the example's possible artifacts.\nFor connector-only work without a Dataverse inventory, report Data Model and\nManifest as `not applicable`; do not print a nonexistent manifest path. If a\nverified inventory already exists but was untouched, label it `unchanged`.\n\nInclude every affected table's `offlineRetirement` status in memory-bank and the\nfinal response. `pending` returns `DONE_WITH_CONCERNS`, not a clean `DONE`:\n\"App changes completed. The offline profile still includes Orders; deciding\nwhether to retain or remove that coverage is pending.\"\nUse actual table names and verified app results; if app cleanup failed, report\nthat failure instead of claiming completion. `retained` reports the approved\nreason; `reconciled` requires verified profile migration, not an `in-sync` result.\n\n```\n✅ Data sources set up\n─────────────────────────────────────────────\nData model:\n  Tables reused  : \u003Clist>\n  Tables extended: \u003Clist>\n  Tables created : \u003Clist>\n  Manifest      : \u003Cverified manifest path and updated\u002Funchanged status, or \"not applicable\">\n\nConnectors:\n  \u003Clist of added connectors, or \"None\">\n\nGenerated services:\n  src\u002Fgenerated\u002Fservices\u002F × \u003CN>\n  src\u002Fgenerated\u002Fmodels\u002F   × \u003CN>\n\nType-check: PASS\n\nNext steps:\n  \u002Fadd-datasource   — add more data sources\n  \u002Fadd-native       — add device capabilities\n  \u002Fedit-app         — separately request consumer\u002Fscreen changes if needed\n─────────────────────────────────────────────\n```\n\n## Reference\n\n- [shared\u002Freferences\u002Fconnector-planning.md](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Fconnector-planning.md) — connector inference + confirmation logic\n- [shared\u002Freferences\u002Foffline-profile-reconciliation.md](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Foffline-profile-reconciliation.md) — Phase 6.5 offline delta check + reconciliation flow\n- [skills\u002Fadd-dataverse\u002FSKILL.md](..\u002Fadd-dataverse\u002FSKILL.md) — full data model execution workflow\n- [agents\u002Fdata-model-architect.md](..\u002F..\u002Fagents\u002Fdata-model-architect.md) — read-only architect agent\n",{"name":5,"model":54,"description":7,"allowed-tools":55,"user-invocable":56},"opus","Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion, EnterPlanMode, ExitPlanMode, Task, Skill",true,"main","0a55a88fa2855404029d1e5450faf92878baf763","plugins\u002Fmobile-apps\u002Fskills\u002Fsetup-datamodel",232,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills","https:\u002F\u002Fmicrosoft.github.io\u002Fpower-platform-skills\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 21:46:39",{"source":8,"skillName":5,"commands":68,"prompt":78,"zipAvailable":56},[69,72,75],{"tool":70,"command":71},"npx","npx skills add microsoft\u002Fpower-platform-skills --skill setup-datamodel",{"tool":73,"command":74},"bunx","bunx skills add microsoft\u002Fpower-platform-skills --skill setup-datamodel",{"tool":76,"command":77},"pnpm","pnpm dlx skills add microsoft\u002Fpower-platform-skills --skill setup-datamodel","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmobile-apps\u002Fskills\u002Fsetup-datamodel\u002FSKILL.md",[],[81,89,107,128,146,160],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":88},"01M78JN2BFRRV1J54Q6WKZQ08D","compare-site-configurations","Compare Power Pages site configurations between two environments, such as dev, test and production, or between a local download and the live site, and explain which differences change site behavior. Use when a site works in one environment but not another (for example, works in dev but fails in test), to check configuration drift before promoting or deploying, or to see what changed between two sites. Produces a shareable HTML report and a JSON file that VS Code can import.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-pages\u002Fskills\u002Fcompare-site-configurations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":90,"name":30,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":49},"01M699WVHX0XN59EPBTTPEKYPG","Use when Process Intelligence needs building, explicit cloud\u002Faccount\u002Fenvironment configuration, sign-in, connection diagnostics, or recovery from an authentication error.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fsetup\u002FSKILL.md",[],[30,95,96,97,98,99,34,100,101,102,43,103,104,105,38,106],"configuration","diagnostics","error","environment","cloud","connection","authentication","use","recovery","process","sign","intelligence",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":116,"publishedAt":49},"01M699WSR9EX55YY1WD9J22FEG","report-issue","Use when the user wants a Process Intelligence bug-report draft or support summary for a failed operation.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Freport-issue\u002FSKILL.md",[113],{"categoryNo":114,"categoryName":115,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000034","行政与办公人员",[117,118,119,120,102,34,121,122,104,123,106,124,125,126,127],"issue","report","report issue","bug-report","operation","draft","bug","summary","user","for","support",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":49},"01M699WR26YQ9Q21KE6MJF5B2G","investigate-process","Use when a broad Process Mining business question, observed pattern or competing explanation needs investigation across analytical perspectives.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Finvestigate-process\u002FSKILL.md",[],[135,104,136,137,102,138,139,34,140,141,142,38,143,144,145],"investigate","investigate process","question","process mining","business","across","perspectives","mining","pattern","investigation","analytical",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":49},"01M699WP9SDG5ZR12P8VYNXKTN","derive-metric","Use when a requested measure is missing, a saved custom metric needs reuse, or an ephemeral formula or derived scalar is needed.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fderive-metric\u002FSKILL.md",[],[153,154,155,156,157,158,102,34,159,38],"metric","derive metric","missing","formula","custom","reuse","saved",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":49},"01M699WMG5R8P6SMTDAS1TKF9E","compare-cohorts","Use when comparing process cohorts, departments, periods or before-and-after results under matched definitions.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fcompare-cohorts\u002FSKILL.md",[],[167,168,102,34,169,104,38],"compare","compare cohorts","results"]