Skip to content

feat: add ERP routing to dv-admin, dv-metadata, and dv-connect MCP setup#91

Open
athanipavan wants to merge 13 commits into
mainfrom
pathani/erpskill2
Open

feat: add ERP routing to dv-admin, dv-metadata, and dv-connect MCP setup#91
athanipavan wants to merge 13 commits into
mainfrom
pathani/erpskill2

Conversation

@athanipavan

Copy link
Copy Markdown

Closes the three remaining fundamental ERP (Finance and Operations) routing gaps that PR #90 left open. All additions are backward-compatible capability adds — no existing behavior changes.

What's routed now

  • dv-admindataverse erp batch list|cancel as a first-class admin mechanism. New safety rule 5 gates the destructive cancel path (echo JobDescription/Status/StartDateTime/CompanyAccounts and require yes, cancel <BatchJobRecId>). Full workflow — real --company/--status/--caption/--top/--json flags, Waiting|Executing|Finished|Error|Cancelled status enum, BatchJobRecId long-int semantics, out-of-scope operations, cross-skill ERP-target map — lives in references/erp-batch.md. Verified against DataverseCLI/src/DataverseCli/Erp/ErpBatchCommand.cs — no fabricated verbs or flags.
  • dv-metadata — one-row Skill-boundaries addition so describe ERP entity routes to dv-query (dataverse data describe --target erp) instead of the Dataverse metadata SDK, which has no such entity.
  • dv-connect — extends references/erp-detection.md with an ERP MCP registration (Step 6 follow-up) section: same npx @microsoft/dataverse mcp <url> binary registered against ERP_URL, dataverse mcp allow <clientId> --erp allowlist flag, per-host wiring (Claude/Copilot/Cursor/Codex), validation, skip conditions.

Deliberate non-changes

  • dv-connect body — untouched. ERP MCP guidance is discovered organically from Step 2's existing pointer to erp-detection.md, so dv-connect body stays at pre-existing baseline.
  • dv-admin body — no new ## ERP batch administration section. Signal is carried by safety rule 5 + mechanism table row + reference file, keeping the body under the 5000-token cap.

Version

1.7.0 -> 1.8.0 across all 6 fields (MINOR — additive capabilities, backward compatible).

Static checks

python .github/evals/static_checks.py — only the pre-existing dv-connect (5017) and dv-overview (5393) budget overruns remain. Both are identical to baseline; this PR does not introduce or worsen them. Every other check passes.

Stacking

Stacks on PR #90 (pathani/erpskill1). The GitHub diff on this PR will show combined changes until #90 merges, after which it collapses to just the changes here (~120 lines).

Testing

  • Static checks: passes with only pre-existing baseline overruns.
  • End-to-end interactive: deferred — will exercise via claude --plugin-dir .github/plugins/dataverse on an ERP-linked env once the target env is available.

Pavan Yaduraj Athani and others added 9 commits June 5, 2026 22:58
Treats Finance & Operations as an app on Dataverse, not a separate product. Adds ERP triggers (frontmatter, Plugin Covers note, Dataverse CLI row in capability matrix, routing pointers in PAC CLI row + tool priority). Detail lives in references/erp-target.md to keep the body close to Anthropic's Level 2 budget. Version 1.5.0 -> 1.5.1.

Known: body is 5387 tokens (cap 5000). main was already 5186 over; this PR adds ~200. Opening for internal review of the integration approach — body-trim is a separate pass.
Conflicts:
- plugin.json (x2): take main's expanded plugin description, keep 1.7.0 version
- dv-connect SKILL.md: combine main's Step 5 failure-list update with the ERP detection/smoke-test pointers (extracted to references/erp-detection.md to stay close to budget)

Budget status after merge:
- dv-connect 5017/5000 (+17): the single line linking to erp-detection.md.
  Pre-PR baseline was 4999/5000 on main.
- dv-overview 5395/5000 (+395): pre-existing 5256 overrun on main + 139
  for ERP capability matrix row and tool-priority qualifier. Trimmed from
  +244 to +139 by inlining links and removing redundant prose.
# Conflicts:
#	.cursor-plugin/marketplace.json
#	.github/plugin/marketplace.json
#	.github/plugins/dataverse/.claude-plugin/plugin.json
#	.github/plugins/dataverse/.codex-plugin/plugin.json
#	.github/plugins/dataverse/.cursor-plugin/plugin.json
#	.github/plugins/dataverse/.github/plugin/plugin.json
These were inadvertently swept in by 'git add -A' during the earlier
merge conflict resolution. The plugin's real auth.py lives under
.github/plugins/dataverse/scripts/ and is unchanged in this PR.
Per reviewer feedback on PR #90: UNO is an internal-only codename and
must not appear in externally published skill content. Substituted with
phrasing that describes the actual configuration (F&O linked to /
provisioned on top of the same Dataverse env).
Per reviewer follow-up on PR #90: pick one term and stick with it.
Standardized on 'ERP' as the lead term, with '(Finance and Operations)'
as the first-mention expansion in each skill / reference file.
Replaced all subsequent 'F&O' and 'Finance & Operations' occurrences
with 'ERP'. Single remaining 'F&O' is in a trigger-word list documenting
input variants users may type, not descriptive prose.
Closes the three remaining fundamental ERP (Finance and Operations) routing gaps that PR #90 left open.

dv-admin: adds 'dataverse erp batch list|cancel' as a first-class admin mechanism. New safety rule 5 gates the destructive cancel path — echo JobDescription/Status/StartDateTime/CompanyAccounts back to the user and require 'yes, cancel <BatchJobRecId>' before executing. Full workflow (real --company / --status / --caption / --top / --json flags, status enum Waiting|Executing|Finished|Error|Cancelled, BatchJobRecId long-int semantics, out-of-scope operations, cross-skill ERP-target map) lives in references/erp-batch.md. Verified against DataverseCLI/src/DataverseCli/Erp/ErpBatchCommand.cs — no fabricated verbs or flags.

dv-metadata: adds Skill-boundaries row so 'describe ERP entity' routes to dv-query (dataverse data describe --target erp) instead of the Dataverse metadata SDK, which has no such entity.

dv-connect: extends references/erp-detection.md with 'ERP MCP registration (Step 6 follow-up)' — same npx @microsoft/dataverse mcp <url> binary registered against ERP_URL, dataverse mcp allow <clientId> --erp for the allowlist, per-host wiring (Claude/Copilot/Cursor/Codex), validation, skip conditions. SKILL.md body deliberately untouched — the reference is already discovered from Step 2 when ERP linkage is detected, so no new tokens on the body budget.

Version bump 1.7.0 -> 1.8.0 across all 6 fields (MINOR — additive capabilities, backward compatible).

Static checks: only pre-existing dv-connect (5017) and dv-overview (5393) budget overruns remain — unchanged from baseline, not introduced or worsened by this PR.

Stacks on PR #90 (pathani/erpskill1). The GitHub diff will show combined changes until #90 merges.
@athanipavan
athanipavan requested a review from a team July 2, 2026 06:28
jeffandms
jeffandms previously approved these changes Jul 6, 2026
- erp-detection.md: tighten ERP MCP registration to reuse mcp-configuration.md patterns; drop speculative Copilot-specific troubleshooting and unverified tool references.

- mcp-configuration.md: cross-reference ERP variant from the Copilot registration block.

- dv-admin, dv-connect, dv-overview SKILL.md: collapse inline ERP prose to terse pointers so bodies stay under the 5000-token EVAL-BUDGET-02 cap; erp-batch.md updated for the removed safety-rule cross-ref.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the Dataverse skills plugin’s ERP (Finance & Operations) target routing guidance across dv-query/dv-data/dv-metadata/dv-connect/dv-admin, primarily by adding reference docs and updating skill-boundary routing so agents choose the correct ERP toolchain (ERP MCP or dataverse --target erp) instead of the Python SDK.

Changes:

  • Add ERP querying/writing guidance to dv-query and dv-data, and introduce a central ERP routing reference (dv-overview/references/erp-target.md).
  • Add ERP MCP registration guidance to dv-connect references and ERP batch admin guidance to dv-admin (plus a dedicated erp-batch.md reference).
  • Bump plugin/marketplace versions (intended to 1.8.0).

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
.github/plugins/dataverse/skills/dv-query/SKILL.md Adds ERP query routing section and updates boundaries to route ERP reads via MCP/CLI.
.github/plugins/dataverse/skills/dv-overview/SKILL.md Broadens overview to include ERP and links to ERP routing reference.
.github/plugins/dataverse/skills/dv-overview/references/erp-target.md New reference defining ERP detection and tool-priority routing model.
.github/plugins/dataverse/skills/dv-metadata/SKILL.md Adds a boundary note redirecting ERP schema discovery away from SDK metadata.
.github/plugins/dataverse/skills/dv-data/SKILL.md Adds ERP write routing section and key differences table.
.github/plugins/dataverse/skills/dv-connect/references/mcp-configuration.md Adds note about registering a second MCP server for ERP-linked envs.
.github/plugins/dataverse/skills/dv-connect/references/erp-detection.md New reference describing ERP linkage detection, smoke test, and ERP MCP registration.
.github/plugins/dataverse/skills/dv-admin/SKILL.md Adds ERP batch admin mention and reference link in dv-admin.
.github/plugins/dataverse/skills/dv-admin/references/erp-batch.md New reference documenting `dataverse erp batch list
.github/plugins/dataverse/.github/plugin/plugin.json Bumps plugin version to 1.8.0.
.github/plugins/dataverse/.cursor-plugin/plugin.json Bumps plugin version to 1.8.0.
.github/plugins/dataverse/.codex-plugin/plugin.json Bumps plugin version to 1.8.0.
.github/plugins/dataverse/.claude-plugin/plugin.json Bumps plugin version to 1.8.0.
.github/plugin/marketplace.json Bumps marketplace metadata/plugin version to 1.8.0.
.cursor-plugin/marketplace.json Bumps Cursor marketplace metadata/plugin version (currently inconsistent vs 1.8.0 intent).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .cursor-plugin/marketplace.json Outdated
Comment thread .cursor-plugin/marketplace.json Outdated
"description": "Microsoft Dataverse plugin for coding agents — powering CRUD, bulk data operations, advanced queries, schema lifecycle, and environment management through intelligent skills that unify MCP, CLI, and SDK workflows.",
"source": "./.github/plugins/dataverse",
"version": "1.6.0",
"version": "1.7.0",
Comment on lines 76 to 79
# get_client sets a plugin attribution context on the User-Agent header.
# Do not modify the context value — it is a closed schema for server-side
# telemetry (app/skill/agent). Never include secrets or PII.
# telemetry (app/skill/agent/target). Never include secrets or PII.
client = get_client("dv-query")
Comment thread .github/plugins/dataverse/skills/dv-data/SKILL.md Outdated
| **Python SDK — recyclebinconfigs** | Recycle bin on/off + retention days | CREATE/PATCH `recyclebinconfigs` entity record |
| **Python SDK — settingdefinition + organizationsettings** | App-level / plan-level security role toggles | Look up `settingdefinition` by `uniquename` → CREATE or PATCH `organizationsettings` row with `value` |

ERP batch admin (`dataverse erp batch list|cancel`): see [`references/erp-batch.md`](references/erp-batch.md).
saurabhrb
saurabhrb previously approved these changes Jul 15, 2026
Comment thread .github/plugins/dataverse/skills/dv-connect/references/erp-detection.md Outdated
@saurabhrb
saurabhrb self-requested a review July 15, 2026 19:25

@saurabhrb saurabhrb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against tip 00edefb. The dv-admin erp batch routing is excellent — the cancel confirmation gate and the Waiting|Executing|Finished|Error|Cancelled status enum match ErpBatchCommand.cs exactly, with no fabricated verbs. Inline comments below; one note here:

  • Version drift. .cursor-plugin/marketplace.json (repo root) is still 1.7.0 while every other manifest is 1.8.0. It's absent from this PR's diff because it wasn't bumped, and static_checks.py doesn't cover that catalog — so CI passes but the shipped Cursor listing would show a stale version. Please bump it to 1.8.0.

Comment thread .github/plugins/dataverse/skills/dv-query/SKILL.md
Comment thread .github/plugins/dataverse/skills/dv-data/SKILL.md

A successful one-row response proves the active auth profile can reach the ERP OData endpoint. If this fails but the Dataverse-side checks pass, the user's account likely lacks ERP access — surface that explicitly rather than re-running Steps 1–4.

## ERP MCP registration (Step 6 follow-up)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discovery is 2-hop and circular. On this branch the dv-connect body still doesn't link this file; it's only reachable via mcp-configuration.md → erp-detection.md and erp-batch.md → erp-detection.md — both reference-to-reference links, which CLAUDE.md says to avoid ("references one level deep"). Worse, mcp-configuration.md only points here "if .env has ERP_URL", but ERP_URL is only written by following this file — so in a normal connect flow it's never opened. Please add a direct dv-connect body pointer at Step 2 so detection runs during connect.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed it

Comment thread .github/plugins/dataverse/skills/dv-connect/references/mcp-configuration.md Outdated
Comment thread .github/plugins/dataverse/skills/dv-data/SKILL.md Outdated
- dv-connect: add direct Step 2 pointer to erp-detection.md (Saurabh)

- dv-connect/erp-detection: drop confusing --environment flag; use active profile

- dv-connect/mcp-configuration: drop redundant ref-to-ref cross-link

- dv-admin: add safety rule 5 gating ERP batch cancel (Copilot)

- dv-query: correct User-Agent closed schema to (app/skill/agent); extract ERP-reads section to references/erp-reads.md

- dv-data: extract ERP-writes section to references/erp-writes.md (fixes data-invoke reference and threshold contradiction)

- cursor-plugin marketplace: bump 1.7.0 -> 1.8.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants