ci(workflows): align copilot-setup-steps install scope - #1641
Merged
Conversation
Change PowerShell module installs (PowerShell-Yaml, PSScriptAnalyzer, Pester) from -Scope CurrentUser to -Scope AllUsers so subsequent steps and shells in the Copilot Coding Agent runner can resolve the modules without per-user PSModulePath fixups. Remove an erroneous 'npx --no vally -- --version' line from the verification block. Companion adjustments in .devcontainer/scripts/on-create.sh and .vscode/settings.json are intentionally deferred to a separate PR (PR F) per the stacked-PRs plan.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1641 +/- ##
==========================================
+ Coverage 85.39% 85.62% +0.22%
==========================================
Files 91 86 -5
Lines 13155 12549 -606
==========================================
- Hits 11234 10745 -489
+ Misses 1921 1804 -117
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This was referenced May 24, 2026
rezatnoMsirhC
approved these changes
May 26, 2026
bindsi
approved these changes
Jun 2, 2026
bindsi
left a comment
Member
There was a problem hiding this comment.
Approving — triage review.
Verdict: LGTM. Switching the module Install-Module scope to AllUsers and dropping the vally --version smoke-test line is reasonable for the setup workflow.
NOTE: the failing npm Security Audit check is unrelated to this one-line workflow diff (no dependency/package.json changes here). Recommend confirming it's a pre-existing/environmental advisory before merge rather than treating it as introduced by this PR.
WilliamBerryiii
added a commit
that referenced
this pull request
Jun 4, 2026
) # Pull Request ## Description This PR migrates the planner disclaimer single-source-of-truth (SSOT) from the standalone YAML config at `.github/config/disclaimers.yml` to a markdown authoring contract embedded in `.github/instructions/shared/disclaimer-language.instructions.md`. It stacks on **#1497** (`feat/sssc-planner-rai-parity`) because removing `disclaimers.yml` would conflict with any branch in the stack that does not include this migration. The instruction file now defines the disclaimer corpus as H2 sections whose slugified headings (for example, *RAI Planning* → `rai-planner`) are the parser-derived keys. Each section carries a CAUTION blockquote that captures the session-start disclaimer, plus prose paragraphs joined into a single string by the parser. A short *Authoring Contract* preamble documents the rules so future edits stay machine-readable without referring to the validator source. The validator, **`scripts/linting/Validate-PlannerArtifacts.ps1`**, swaps its YAML loader for `Import-DisclaimerSource`, which parses the new markdown SSOT, derives planner keys from heading slugs, extracts CAUTION blockquotes (stripping the `> [!CAUTION]` prefix), and joins multi-line prose. The function's `-DisclaimerConfigPath` parameter is renamed to `-DisclaimerSourcePath` to reflect the markdown origin. A new contract suite, **`scripts/tests/linting/Test-DisclaimerArtifacts.Tests.ps1`** (8 cases), asserts that: * the SSOT instruction file parses into the expected planner keys with non-empty CAUTION blockquotes and prose; and * every planner identity file (RAI and Security) carries the required *Session Start Display* literal and an *Exit Point Reminder* section that references each named exit point. To satisfy the second assertion, this PR also adds the *Disclaimer and Attribution Protocol* section to **`.github/instructions/security/identity.instructions.md`**, sourced verbatim from the snapshot. The hunks in **`scripts/tests/linting/Validate-PlannerArtifacts.Tests.ps1`** are trimmed to disclaimer-related coverage only; the SSSC-parity hunks are deferred to a later PR in the stack. The three regenerated **`plugins/*/README.md`** files reflect the disclaimer SSOT description text and are produced by `npm run plugin:generate`. ## Related Issue(s) Stacks on #1497. No other issue references in commits or branch name. ## Type of Change Select all that apply: **Code & Documentation:** * [ ] Bug fix (non-breaking change fixing an issue) * [ ] New feature (non-breaking change adding functionality) * [x] Breaking change (fix or feature causing existing functionality to change) * [x] Documentation update **Infrastructure & Configuration:** * [ ] GitHub Actions workflow * [x] Linting configuration (markdown, PowerShell, etc.) * [ ] Security configuration * [ ] DevContainer configuration * [ ] Dependency update **AI Artifacts:** * [ ] Reviewed contribution with `prompt-builder` agent and addressed all feedback * [x] Copilot instructions (`.github/instructions/*.instructions.md`) * [ ] Copilot prompt (`.github/prompts/*.prompt.md`) * [ ] Copilot agent (`.github/agents/*.agent.md`) * [ ] Copilot skill (`.github/skills/*/SKILL.md`) > Note for AI Artifact Contributors: > > * Agents: Research, indexing/referencing other project (using standard VS Code GitHub Copilot/MCP tools), planning, and general implementation agents likely already exist. Review `.github/agents/` before creating new ones. > * Skills: Must include both bash and PowerShell scripts. See [Skills](../docs/contributing/skills.md). > * Model Versions: Only contributions targeting the **latest Anthropic and OpenAI models** will be accepted. Older model versions (e.g., GPT-3.5, Claude 3) will be rejected. > * See [Agents Not Accepted](../docs/contributing/custom-agents.md#agents-not-accepted) and [Model Version Requirements](../docs/contributing/ai-artifacts-common.md#model-version-requirements). **Other:** * [x] Script/automation (`.ps1`, `.sh`, `.py`) * [ ] Other (please describe): ## Sample Prompts (for AI Artifact Contributions) <!-- Not applicable as a workflow trigger: the instruction file is a passive SSOT consumed by the validator and is referenced by planner agents at session-start. --> For detailed contribution requirements, see: * Common Standards: [docs/contributing/ai-artifacts-common.md](../docs/contributing/ai-artifacts-common.md) - Shared standards for XML blocks, markdown quality, RFC 2119, validation, and testing * Agents: [docs/contributing/custom-agents.md](../docs/contributing/custom-agents.md) - Agent configurations with tools and behavior patterns * Prompts: [docs/contributing/prompts.md](../docs/contributing/prompts.md) - Workflow-specific guidance with template variables * Instructions: [docs/contributing/instructions.md](../docs/contributing/instructions.md) - Technology-specific standards with glob patterns * Skills: [docs/contributing/skills.md](../docs/contributing/skills.md) - Task execution utilities with cross-platform scripts ## Testing Automated validation performed by the agent: * `npm run lint:md` — markdown linting: **Passed** (211 files, 0 errors). * `npm run lint:frontmatter` — frontmatter validation: **Passed** (541 files, 0 errors). * `npm run lint:ps` — PowerShell analysis: **Passed**. * `npm run lint:yaml` — YAML validation: **Passed** (50 files). * `npm run plugin:validate` — plugin metadata: **Passed**. * `npm run plugin:generate` — plugin outputs regenerated and committed. * `npm run test:ps -- -TestPath scripts/tests/linting/Test-DisclaimerArtifacts.Tests.ps1` — **8/8 passed**. * `npm run test:ps -- -TestPath scripts/tests/linting/Validate-PlannerArtifacts.Tests.ps1` — **34/34 passed**. * `grep -r "config/disclaimers" .github docs scripts collections plugins` — **empty**, confirming no orphan references. Security analysis findings: * No secrets, credentials, or customer data in the diff. * No new runtime dependencies introduced. The validator uses only built-in PowerShell cmdlets to parse markdown. * No changes that broaden privilege boundaries. Diff-based assessments: * All changed files match expected paths derived from the commit subject and the migration scope documented in the stack plan. * The markdown SSOT, validator, and tests follow the existing `.github/instructions/`, `scripts/linting/`, and `scripts/tests/linting/` conventions. > [!NOTE] > Manual testing was not performed. ## Checklist ### Required Checks * [x] Documentation is updated (if applicable) — instruction file gains an authoring contract and the SSOT corpus. * [x] Files follow existing naming conventions. * [x] Changes are backwards compatible (if applicable) — *(N/A — this PR is a BREAKING change. `.github/config/disclaimers.yml` is removed; consumers must reference `disclaimer-language.instructions.md`. Tree-wide grep confirms zero in-codebase consumers of the deleted path; all internal callers are updated in this PR.)* * [x] Tests added for new functionality (if applicable). ### AI Artifact Contributions * [ ] Used `/prompt-analyze` to review contribution * [ ] Addressed all feedback from `prompt-builder` review * [ ] Verified contribution follows common standards and type-specific requirements ### Required Automated Checks The following validation commands must pass before merging: * [x] Markdown linting: `npm run lint:md` * [ ] Spell checking: `npm run spell-check` * [x] Frontmatter validation: `npm run lint:frontmatter` * [ ] Skill structure validation: `npm run validate:skills` * [ ] Link validation: `npm run lint:md-links` * [x] PowerShell analysis: `npm run lint:ps` * [x] Plugin freshness: `npm run plugin:generate` * [ ] Docusaurus tests: `npm run docs:test` ## Security Considerations <!--⚠️ WARNING: Do not commit sensitive information such as API keys, passwords, or personal data --> * [x] This PR does not contain any sensitive or NDA information * [x] Any new dependencies have been reviewed for security issues — *(N/A — no new dependencies.)* * [x] Security-related scripts follow the principle of least privilege — *(N/A — no security-related scripts modified.)* ## Additional Notes This PR is the second stacked increment in the post-#1497 stack (PR C in plan ordering). The base will switch from `feat/sssc-planner-rai-parity` to `main` after #1497 merges. The companion PRs in the stack are: * **PR A (#1638)** — Security Planner state schema and fixtures. * **PR B** — Security Planner agent and phase-gate parity (depends on PR A). * **PR D** — Planner linter hardening (sibling off `main`). * **PR E** — Dev environment alignment (sibling off `main`, optional). A small *Disclaimer and Attribution Protocol* section is added to `.github/instructions/security/identity.instructions.md` (sourced verbatim from the snapshot) so the new contract test passes for both planner identities. The SSSC-parity hunks in `Validate-PlannerArtifacts.Tests.ps1` are intentionally deferred to **PR B**, which lands them alongside the Security Planner content they exercise. ## Merge Order This PR is part of a stack derived from PR #1497. Required merge sequence: 1. #1638 (PR A — `stack/security-state-schema`) — adds `disclaimerShownAt` to canonical schemas 2. #1639 (PR C — this PR) — relocates disclaimer protocol to shared instructions 3. #1642 (PR B — `stack/security-planner-parity`) — consumes both #1640 and #1641 are siblings and may merge in any order independent of this chain.
agreaves-ms
approved these changes
Jun 7, 2026
WilliamBerryiii
added a commit
that referenced
this pull request
Jun 9, 2026
## Summary Brings the `security-planner` agent, its supporting instructions, and the shared RAI capture-coaching guidance up to the same phase-gate, state, and question-cadence parity established by the `sssc-planner` work in PR #1497. Bundles the planner-startup, cadence Rule 5 ordering, risk-grid grammar, and state-schema test suites that guard those conventions going forward. ## Stacking - **Base:** `stack/security-state-schema` (PR #1638, "PR A") - **Upstream:** PR #1497 (sssc-planner) - **Siblings:** PR #1639 (PR C — Disclaimer/Attribution Protocol), PR #1640 (PR D) - **Do not merge** until the PR #1497 → PR #1638 cascade completes. ## Changes **Modified (10):** - `.github/agents/security/security-planner.agent.md` - `.github/instructions/security/identity.instructions.md` - `.github/instructions/security/security-model.instructions.md` - `.github/instructions/security/backlog-handoff.instructions.md` - `.github/instructions/rai-planning/rai-capture-coaching.instructions.md` - `.github/prompts/security/security-capture.prompt.md` - `.github/prompts/security/security-plan-from-prd.prompt.md` - `plugins/hve-core-all/README.md` (auto-regen) - `plugins/project-planning/README.md` (auto-regen) - `plugins/security/README.md` (auto-regen) **Added (5 Pester suites):** - `scripts/tests/linting/Test-PlannerStateSchema.Tests.ps1` — 8 tests - `scripts/tests/linting/Test-PlannerStateSchemas.Tests.ps1` — 4 tests - `scripts/tests/linting/Test-CadenceRule5Ordering.Tests.ps1` — 2 tests - `scripts/tests/linting/Test-PlannerStartupBlocks.Tests.ps1` — 6 tests - `scripts/tests/linting/Test-RiskGridGrammar.Tests.ps1` — 7 tests ## Validation | Check | Result | | --- | --- | | `npm run plugin:validate` | ✅ 13 collections | | `npm run lint:md` | ✅ 211 files, 0 errors | | `npm run lint:frontmatter` | ✅ 541 files, 0 errors | | `npm run lint:md-links` | ✅ | | `npm run lint:ps` | ✅ | | `Test-PlannerStateSchema` | ✅ 8/8 | | `Test-PlannerStateSchemas` | ✅ 4/4 | | `Test-CadenceRule5Ordering` | ✅ 2/2 | | `Test-PlannerStartupBlocks` | ✅ 6/6 | | `Test-RiskGridGrammar` | ✅ 7/7 | ## Notes for Reviewers 1. **`disclaimerShownAt: null` in identity state schema** — Adds one line to the inline state schema in `identity.instructions.md` so the canonical state shape declares the field with a default. Full Disclaimer/Attribution Protocol prose that consumes the field remains in PR C (#1639). Three-way overlap with PR #1639 on this file is expected. 2. **`Test-PlannerStateSchemas.Tests.ps1` assertion direction** — Authored draft used `Should -Not -Contain 'disclaimerShownAt'` against the `required` arrays. Per plan decision DD-06/ID-02 (`.copilot-tracking/plans/2026-05-22/stacked-prs-from-pr-1497-plan.instructions.md` line 41), the snapshot demotion of `disclaimerShownAt`/`signingManifestPath` from `required` was **rejected for uniformity** across `security-state`, `rai-state`, and `sssc-state` schemas. Flipped both assertions to `Should -Contain` so the test now affirms the documented uniformity decision. Schemas themselves are unchanged. 3. **Auto-regenerated plugin READMEs** — `plugins/hve-core-all/README.md`, `plugins/project-planning/README.md`, and `plugins/security/README.md` reflect descriptive SSSC text drift produced by `npm run plugin:generate`. Benign; produced by tooling. 4. **Sandbox/environment note** — All Pester suites and pwsh-yaml-dependent lints (`plugin:generate`, `plugin:validate`, `lint:frontmatter`, `lint:md-links`, `lint:ps`) require unsandboxed execution because the `PowerShell-Yaml` module is installed under `~/.local/share/powershell/Modules`. ## Merge Order This PR is part of a 5-PR stack split from PR #1497. Merge in this order: 1. **#1638** — `feat(scripts): security-planner state schema` (base) 2. **#1639** — `feat(prompts): RAI disclaimer/attribution protocol` (independent of B, but lands before B for review continuity) 3. **#1642** (this PR) — `feat(agents): security-planner SSSC parity` (depends on #1638) Independent of the above sequence: - **#1640** — `feat(scripts): risk-grid grammar enforcement` (no shared files) - **#1641** — `chore(plugins): regenerated plugin READMEs` (tooling output only) After #1638 and #1639 merge, rebase this branch onto `main` before merging. --------- Signed-off-by: williamberryiii <wberry@microsoft.com> Co-authored-by: Bill Berry <wbery@microsoft.com>
Closed
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
This PR makes two small, surgical edits to
.github/workflows/copilot-setup-steps.yml— the workflow that prebuilds the Copilot Coding Agent environment:-Scope CurrentUserto-Scope AllUsersfor the three required modules (PowerShell-Yaml 0.4.7,PSScriptAnalyzer 1.25.0,Pester 5.7.1). Versions and the optionalHVE_PSGALLERY_SOURCE_URLrepository registration are unchanged.AllUserswrites modules to/usr/local/share/powershell/Modules, which is on the defaultPSModulePathfor any user and any shell on the runner, so subsequent workflow steps and ad-hoc shells do not need per-userPSModulePathfixups to resolve the modules.npx --no vally -- --versionfrom the tool verification block. The intended command does not exist; it was a stray typo (likely from--no-installfollowed by a partial package name) and currently fails silently or noisily depending on the environment.This PR is a sibling of #1497, branched off
main. It is independent of PRs A/B/C/D in the post-#1497 stack and can land in any order relative to them.Scope
This PR ships only the workflow edit. The matching local-environment changes from the original snapshot (
.devcontainer/scripts/on-create.shand.vscode/settings.json) are deliberately deferred to a separate PR (PR F) pending user confirmation of intent. See follow-on WI-02 in the planning log.Related Issue(s)
Sibling of #1497. No other issue references.
Type of Change
Select all that apply:
Code & Documentation:
Infrastructure & Configuration:
AI Artifacts:
prompt-builderagent and addressed all feedback.github/instructions/*.instructions.md).github/prompts/*.prompt.md).github/agents/*.agent.md).github/skills/*/SKILL.md)Other:
.ps1,.sh,.py)Sample Prompts (for AI Artifact Contributions)
For detailed contribution requirements, see:
Testing
Automated validation performed by the agent:
npm run lint:yaml— PASS (50 workflow files, includingcopilot-setup-steps.yml).actionlint .github/workflows/copilot-setup-steps.yml— PASS (EXIT=0).npm run lint:ps— skipped in the sandbox (PSGallery network restricted); the diff contains no.ps1changes, so PSScriptAnalyzer would have nothing new to flag.Security analysis findings:
-Scope AllUsersrequires root on the runner. Thecopilot-setupjob already runs as root onubuntu-latest, so no privilege escalation is introduced.npx --no vally -- --versionis removed, not replaced.Diff-based assessments:
+3 / -4, one file, zero new files, zero structural changes to the workflow graph.Note
Manual testing was not performed. The next live run of
copilot-setup-steps.ymlon a Coding Agent task will exercise the new install scope end-to-end.Checklist
Required Checks
AI Artifact Contributions
/prompt-analyzeto review contributionprompt-builderreviewRequired Automated Checks
The following validation commands must pass before merging:
npm run lint:mdnpm run spell-checknpm run lint:frontmatternpm run validate:skillsnpm run lint:md-linksnpm run lint:psnpm run plugin:generatenpm run docs:testSecurity Considerations
Additional Notes
Companion PRs in the post-#1497 work stream:
feat/sssc-planner-rai-parity).feat/sssc-planner-rai-parity).applyToregression guard (sibling offmain)..vscode/settings.jsoncompanion changes, pending user confirmation of intent (WI-02).