feat(agents): add Copilot Studio Agent Builder (agent + safety instructions + pac skill)#2411
Draft
Dongbumlee wants to merge 12 commits into
Draft
feat(agents): add Copilot Studio Agent Builder (agent + safety instructions + pac skill)#2411Dongbumlee wants to merge 12 commits into
Dongbumlee wants to merge 12 commits into
Conversation
…-code Adds a standalone Power Platform contribution to HVE Core: - .github/agents/power-platform/copilot-studio-agent-builder.agent.md: a phased agent that guides authors through designing and building a Microsoft Copilot Studio agent (capability profiling, purpose/success, system instructions, grounding via Knowledge/Web Search/Work Context, actions/tools/orchestration, testing, and pac-CLI deployment guidance). - .github/instructions/power-platform/copilot-studio.instructions.md: companion safety-floor instructions (R1-R4 risk taxonomy, DLP guidance, and Section 9 capability-module guardrails). capabilities.tools covers first-party actions/connectors only; enabling any MCP tool, connected agent, or trigger sets capabilities.orchestration, crosses a trust boundary, and requires the Section 9 guardrail plus an orchestration-boundary test. - TRANSPARENCY-NOTE.md: adds an Intended-uses entry and Appendix 6 (Copilot Studio Agent Builder) documenting the external Copilot Studio / Power Platform target and decision-shaping behavior. - .cspell/general-technical.txt: adds pac CLI terms msapp and packagetype. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…kill, evals, registrations Extend the experimental Copilot Studio Agent Builder with a grounded pac CLI skill, behavior evals, and QA-hardened deploy/iteration recipes; register it across the experimental and hve-core-all collections and plugins. Agent + instructions (QA hardening): - Phase 10 deploy recipe: correct Flow 1 (net-new: pack --publisher-prefix -> solution import --publish-changes) vs Flow 2 (update: clone -> push --project-dir -> publish --bot); fix invalid flags (drop --schemaName on push, add --bot-id to status) that contradicted the cited skill. - Add discover-then-confirm deploy-target handling (pac auth list / pac org who -> propose-and-confirm or ask) so an undesignated env is never turned into an "I can't run pac" refusal; preserve the never-guessed invariant. - Add a bounded verify-then-remediate deploy loop: trust pac copilot list + clone round-trip over the cosmetic publish/status verb exit; re-run import once, then HALT + escalate. - Phase 7/8 bounded auto-fix on failure; Phase 8 automated-RAI evidence tiers (platform-native config-present + opt-in pro-dev behavior-verified) that INFORM but never self-certify evalPassed/raiApproved (fail-closed S6 held). - prompt-analyze fixes: disable-model-invocation frontmatter; de-bold structural title bullets to match reference agents. New: .github/skills/power-platform/copilot-studio-pac (verified pac recipes, deploy flows, verb reference); behavior stimulus + expectations and eval.yaml/ AGENTS.yml coverage; experimental + hve-core-all collection/plugin entries; cspell terms; TRANSPARENCY-NOTE appendix update. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…acy + post-deploy behavior gate The Phase 8 'Responsible AI Gate' ran the heavy independent RAI assessment and the eval pre-deploy, so for any safety-oriented agent they could only ever return a conditional 'not yet' (nothing live to behavior-verify), collapsing genuine-HALT and routine proceed-to-Dev/Test into the same red REJECTED surface (crying-wolf gate) and blocking deploy before the very behavior the gate needs could exist. F5-v2 redesign: - Phase 8 becomes a 'Governance & RAI Design-Adequacy Review': a cheap Builder-run checklist that renders CLEARED-FOR-DEV/TEST (new flag phases.governance.raiDevTestCleared) or HALT (genuine unmitigable design-level risk only). It never sets raiApproved and escalates to @rai-planner only on a flagged design risk. - phases.testPlan.evalPassed and phases.governance.raiApproved are set only post-deploy in Phase 10, against the live agent. One authoritative independent @rai-planner behavior assessment runs once, after evalPassed. Prod at Phase 8 is DEFERRED, never rejected. - Phase 10 documents the eval execution channel (test canvas / Direct Line; secret never routed through the model; operator-attended, fail-closed) and the eval->RAI->Prod sequence. Mirrored across companion instructions, copilot-studio-pac SKILL, and the behavior expectations. Safety invariant preserved: the Builder still cannot self-certify the Production flags. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ion + verify live tool execution post-deploy (F8/F9) F8: under generative orchestration the planner ignores classic topic routing-priority, so a top-priority Escalate topic is not a reliable safety control. Move the R1-R4 escalation/refusal floor into system instructions, bar tool-calls for refusal-class/safety intents, and forbid empty/blank turns on safety intents (Phases 2/3 + instructions section 2). Add paraphrase-robust escalation coverage and a no-empty-turn check to the Phase 7 test plan. F9: a [cite:...] provenance token proves knowledge-grounding, not live tool execution. Add a Phase 5 connector-action schema-completeness check (required inputs bound + connection reference minted before 'live'), a mandatory Phase 10 post-deploy tool-invocation smoke probe (with a write/destructive-action carve-out honoring guardrail microsoft#3/R2), a Phase 7 tool-execution grader, a Phase 9 bindings tool-invocation-result column, and an instructions section 6 bind-before-push rule. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…y tiers (F10/F11)
Add a topic-file integrity contract and a complexity-tier model to the
Copilot Studio Agent Builder harness so structural topic defects are caught
at design time and fail-closed before pack/import, rather than surfacing as
runtime errors on a live agent.
Instructions (copilot-studio.instructions.md):
- Section 3: Topic-integrity invariants (i-v) - componentName uniqueness with
system-topic exemption; custom topics may not redefine a system trigger kind
(redirecting to a system topic is legal, redefining it is not); no undeclared
{...} tokens (declared System./Topic./Global. tokens allowed); load-bearing
skeleton with a per-tier terminal node; at most one topic per system trigger.
- Section 3: Topic complexity tier (T1-T4) with a Learn node-vocab reference
and the tier>=2-collapsed-to-one-SendActivity anti-pattern.
- Section 7: Topic-tree reconciliation (workspace <-> out/*-src <-> pack;
topicCount = custom-topic source-file count reconciled to the packed count).
Agent (copilot-studio-agent-builder.agent.md):
- Phase 2 objective + gate: assert the integrity invariants and record each
topic's complexity tier (node graph required for tier >= 2) at design time.
- Phase 9: fail-closed pre-pack topic-integrity gate (schema-valid skeleton,
componentName rules, no undeclared tokens, tree reconciliation, topicCount).
Additive only; no existing safety rule weakened. Validators green
(spell-check, lint:frontmatter, validate:skills).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ship validate-topics.mjs, a fail-closed static validator that enforces the Copilot Studio Agent Builder Phase 9 pre-pack topic-integrity gate: schema skeleton (mcs.metadata, kind: AdaptiveDialog, beginDialog.id: main), undeclared {token} detection, system-trigger collision, at-most-one-per-trigger, componentName uniqueness + filename match, and topicCount reconciliation. Zero third-party deps (js-yaml resolved from the hve-core workspace); reads topic source only, never writes to an environment. Exit 0 all pass / 1 a topic FAILs / 2 usage-or-parse error.
Add validate-topics.ps1 and validate-topics.sh launchers (satisfy the non-Python scripts/ .ps1+.sh structure rule; forward args and propagate the engine exit code).
Wire the gate into the harness: agent.md Phase 9 gate now references the executable validator, and copilot-studio-pac/SKILL.md documents it (usage, exit codes, checks).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- eval-presence: add stimulus backlinks for the copilot-studio instruction and copilot-studio-pac skill so the eval-presence gate reports them covered (evals/behavior-conformance/instructions.eval.yaml + skill-behavior.eval.yaml) - plugins: repair 6 plugin stubs from regular files to 120000 symlinks that point at the canonical .github/ artifacts (broken on Windows checkout) - agent: reword two retext-profanities-flagged terms (traps->pitfalls, 'drug name'->'record ID') to satisfy eval:lint:text Gates verified green locally: eval:presence (76 covered / 0 missing vs upstream/main), eval:lint:schema (10 specs, 49/49 agent coverage), eval:lint:text (0 errors). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…es, eval regen) Resolves three compliance findings from the full CONTRIBUTING.md pre-submit sweep: - TRANSPARENCY-NOTE.md: remove 8 em dashes (no-em-dash rule) and wrap 2 lines over the 500-char MD013 limit in the Appendix 6 / intended-uses copy; lint:md now exits 0. Meaning preserved (punctuation + hard-wraps only). - format:tables: apply the repo table formatter to the agent file and 3 skill reference docs (cell-alignment whitespace only; no content change). - evals/agent-behavior/eval.yaml: regenerate from source stimulus via Build-AgentBehaviorSpec.ps1 -Force to clear eval:lint:vally drift (do-not-edit-by-hand generated file). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ester Replace Node.js validate-topics.mjs with a native PowerShell implementation and add a Pester suite, per docs/contributing/skills.md (supported languages = Bash/PowerShell/Python; scripts MUST have unit tests >=80% coverage). Harden the system-topic legitimacy check to require BOTH filename and componentName to be canonical, closing a fail-closed-gate false pass. Fix the missing-dependency guard to exit 2 (not 1) and correct SKILL.md exit-code docs. 69/69 Pester (93.48% cov), validate:skills + lint:ps green. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restructure the Phase 2 and Phase 8 Objective paragraphs in the Copilot Studio Agent Builder from ~300-400-word run-on sentences into scannable bulleted invariants (lossless: every rule, trigger kind, and state variable preserved). Add the Phase-10 deploy-and-iterate.md runbook to the Output-Artifacts tree and a ## Scope section to the companion instructions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Normalize the Parameters table to the aligned form the repo postprocess formatter (markdown-table-formatter) emits, matching every other skill in .github/skills and making the file idempotent under plugin:generate so the plugin-freshness CI gate stays green. Whitespace/alignment only; no content change. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… descriptions Sync the generated experimental + hve-core-all collection docs and plugin READMEs with the current source frontmatter: the Copilot Studio Agent Builder description now reads "ten phases" (Phase 10 deploy-and-iterate) and the copilot-studio-pac skill description was shortened. Keeps npm run plugin:generate idempotent so the plugin-freshness CI gate passes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Adds a Copilot Studio Agent Builder contribution for the Power Platform surface — a net-new agent that takes design inputs (ADRs / architecture / requirements) and produces a deployable, safety-gated Microsoft Copilot Studio agent, together with its safety-floor instruction file and a supporting skill.
Three coordinated AI artifacts plus their registrations and evals:
.github/agents/power-platform/copilot-studio-agent-builder.agent.md: a ten-phase builder (discovery → design → scaffold → gates → attended/designated/gated deploy → post-deploy behavior verification). Safety invariants are fail-closed:evalPassed/raiApprovedare set only post-deploy against the live agent by independent owners, never self-certified; Production is gated on both green flags plus explicit, environment-named approval..github/instructions/power-platform/copilot-studio.instructions.md: the companion safety floor (data-isolation, no-advice / fair-lending guardrails, execution boundary, RAI-controls taxonomy)..github/skills/power-platform/copilot-studio-pac/:pac-workflow guidance plus an executable topic-integrity validator (scripts/validate-topics.ps1+.shlauncher) with a Pester test suite (59/59, 93.97% coverage) that catches latent Copilot Studio pack defects (e.g. a custom topic silently collapsing onto a system trigger).Generated registrations (
collections/*.collection.md,plugins/*/README.md) and eval specs are regenerated from source, not hand-edited.Related Issue(s)
None — net-new contribution.
Type of Change
Code & Documentation:
AI Artifacts:
prompt-builderagent and addressed all feedback.github/instructions/*.instructions.md).github/agents/*.agent.md).github/skills/*/SKILL.md)evals/)Other:
.ps1,.sh,.py) — topic-integrity validator (PowerShell + bash launcher)Sample Prompts (for AI Artifact Contributions)
User Request:
Execution Flow:
pac copilotworkspace (*.mcs.ymlagent + settings + topics), running the topic-integrity validator to fail-closed on any construct that would collapse onpac copilot pack.Output Artifacts:
pac-importable Copilot Studio workspace (agent.mcs.yml,settings.mcs.yml,topics/,knowledge/,connectionreferences/).evals/agent-behaviorstimulus + expectations spec for the builder itself.Success Indicators:
npm run validate:skills,lint:frontmatter,lint:ps,test:ps, andeval:lint:schemapass.0on the scaffold;pac copilot packproduces no silently-dropped topics.evalPassed/raiApprovedare set only by their independent owners.Testing
validate-topics.ps1.evals/agent-behaviorspec discriminates treatment vs control;eval:lint:schemareports full coverage.pac copilot pack→pac solution import --publish-changes→pac copilot cloneround-trip verified; a 12-row safety probe (cross-subject isolation, typed-account isolation, money-movement no-execution, fraud/scam escalation, investment/credit refusals) passed 11/11, with one grounded-citation row documented as a safe deferred gap (no fabrication).Checklist
Required Checks
AI Artifact Contributions
/prompt-analyzeto review contributionprompt-builderreviewRequired Automated Checks
npm run lint:mdnpm run spell-checknpm run lint:frontmatternpm run validate:skillsnpm run lint:md-links— no new external links added by this PR; local run is network-bound (only pre-existing dead links elsewhere in the repo). Deferred to CI.npm run lint:psnpm run eval:lint:schemanpm run plugin:generatenpm run docs:testSecurity Considerations
Additional Notes
power-platform/and are registered in theexperimental+hve-core-allcollections — happy to relocate (e.g.agents/experimental/) per maintainer preference.