AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Enterprise-grade PowerShell development standards, shipped as GitHub Copilot instructions and Claude Code rules, for consistent, secure, and high-quality PowerShell code across teams and projects.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Enterprise-grade PowerShell development standards, shipped as GitHub Copilot instructions and Claude Code
rules, for consistent, secure, and high-quality PowerShell code across teams and projects.
Target versions (verified 2026-08-01): PowerShell 7.6 (LTS) is the default target,
supported through 14-Nov-2028. Windows PowerShell 5.1 remains supported as a compatibility
target. PowerShell 7.4 and 7.5 both reach end of support on 10-Nov-2026 — plan upgrades now.
See powershell-version.instructions.md
for the full lifecycle table, version-gated features, and breaking changes.檢視完整 README ↗Enterprise-grade PowerShell development standards, shipped as GitHub Copilot instructions and Claude Code rules, for consistent, secure, and high-quality PowerShell code across teams and projects.
Target versions (verified 2026-08-01): PowerShell 7.6 (LTS) is the default target, supported through 14-Nov-2028. Windows PowerShell 5.1 remains supported as a compatibility target. PowerShell 7.4 and 7.5 both reach end of support on 10-Nov-2026 — plan upgrades now. See powershell-version.instructions.md for the full lifecycle table, version-gated features, and breaking changes.
# Use as template repository or clone
git clone https://github.com/fadwen/ai-powershell-standards.git
cd ai-powershell-standards
# Install standards in your project
./Tools/Install-CopilotStandards.ps1 -ProjectPath "C:\YourProject" -StandardsType "Module"
# Add as submodule
git submodule add https://github.com/fadwen/ai-powershell-standards.git .copilot-standards
# Link instructions (Windows)
mklink .github\copilot-instructions.md .copilot-standards\.github\copilot-instructions.md
# Link instructions (Linux/macOS)
ln -s .copilot-standards/.github/copilot-instructions.md .github/copilot-instructions.md
.claude/rules/powershell-standards/copilot-instructions.md imports the main
instructions, so every Claude Code session starts with the standardsapplyTo, so a standard loads only when Claude works on a matching file.claude/commands/powershell-standards/ offers each prompt file as
/powershell-standards:<name>, attaching the prompt rather than copying itCLAUDE.md, rules, or commands.github/ files are the only copy. The Claude files reference them, never
restate them+= guidance that changed in PowerShell 7.5Install-PSResource (Microsoft.PowerShell.PSResourceGet) over PowerShellGet
v2, with a capability check for Windows PowerShell 5.1 fallbackShould-* assertions, custom assertions via
New-ShouldAssertion, BeforeDiscovery data, self-contained test files, and 13 supporting guides
covering mocking, CI, and templatesai-powershell-standards/
├── .github/
│ ├── copilot-instructions.md # Main Copilot instructions (applied automatically)
│ ├── instructions/ # 14 scoped instruction files, applied by `applyTo` glob
│ │ ├── powershell-version.instructions.md # Version baseline, lifecycle, breaking changes
│ │ ├── pester.instructions.md # Pester 6.2 core testing standards
│ │ ├── platyps.instructions.md # Help docs: PlatyPS Markdown to MAML
│ │ ├── pull-requests.instructions.md # Branch, commit, and PR conventions
│ │ └── pester-supporting-docs/ # 13 guides: mocking, assertions, CI, templates
│ ├── prompts/ # 10 `/prompt-name` files for Copilot Chat
│ └── workflows/ # Quality gates run on every pull request
├── .claude/
│ ├── commands/
│ │ └── powershell-standards/ # 10 slash commands, one per prompt file; mirrored to consumers
│ └── rules/
│ └── powershell-standards/ # Claude Code rules: 13 path-scoped, 2 always-on; mirrored to consumers
├── Documentation/ # Guides and the deliberate anti-pattern demo
├── powershell-standards/
│ └── Examples/ # Worked examples the instructions link to; mirrored to consumers
├── Templates/ # Module, script-collection, and application templates
│ └── Workflows/ # Workflows to copy into consuming projects
├── Tools/ # Install-CopilotStandards, Test-StandardsCompliance
├── Troubleshooting/ # Organized problem-solving guides
├── .markdownlint.json # Documentation lint rules enforced in CI
├── CLAUDE.md # Notes for working on this repository itself
└── README.md # This file
Current VS Code picks these up with no configuration: .github/copilot-instructions.md is applied
automatically, .github/instructions/*.instructions.md apply to files matching their applyTo
glob, and .github/prompts/*.prompt.md are available as /prompt-name in Copilot Chat.
You only need settings if you keep these files somewhere other than the defaults:
{
"chat.instructionsFilesLocations": { ".github/instructions": true },
"chat.promptFilesLocations": { ".github/prompts": true }
}
Older guidance recommended
chat.promptFilesandgithub.copilot.chat.codeGeneration.useInstructionFiles. Settings-based instructions were deprecated in VS Code 1.102 in favour of the file-based layout above; neither setting is required now.
Nothing to configure either. Claude Code discovers .claude/rules/ recursively. The always-on rule in
.claude/rules/powershell-standards/ imports .github/copilot-instructions.md at launch, and each
path-scoped rule imports one instruction file when Claude touches a matching file. The rules import
rather than copy, so there is one set of standards to maintain. Run /memory inside Claude Code to
see what is loaded.
The prompt files are slash commands in Claude Code too. .claude/commands/powershell-standards/ holds
one command per prompt, so /new-function in Copilot Chat is /powershell-standards:new-function
here. The / menu matches on any part of a name, so typing /new-func is enough to find it.
The installer and the sync workflow mirror both folders into consuming projects along with the
.github/ files and the examples. A project's own CLAUDE.md and anything else it keeps under
.claude/rules/ or .claude/commands/ are never touched.
git submodule add https://github.com/fadwen/ai-powershell-standards.git .copilot-standards
./Tools/Install-CopilotStandards.ps1 -ProjectPath "." -StandardsType "Basic"
Options A through C copy the instruction files once. They then drift as this repository moves on.
Adding -IncludeSyncWorkflow also installs a weekly job that mirrors the instruction files and
opens a pull request when they fall behind:
./Tools/Install-CopilotStandards.ps1 -ProjectPath "." -StandardsType "Basic" -IncludeSyncWorkflow
The workflow needs Settings → Actions → General → Workflow permissions → "Allow GitHub Actions to create and approve pull requests" enabled on the target repository, and it overwrites local edits to the mirrored paths. See Templates/Workflows/ for both caveats in full.
# Test standards compliance
./Tools/Test-StandardsCompliance.ps1 -Path "."
# Create your first function using Copilot
# In VS Code, type: /new-function
# Use the new-function prompt in Copilot Chat
/new-function
# Copilot will prompt for: function name, purpose, parameters
# Generates complete enterprise-standard function with tests
# Select PowerShell code, then use security-review prompt
/security-review
# Comprehensive security analysis with compliance validation
# Select code that needs optimization
/optimize-performance
# Get specific optimization recommendations with benchmarks
Standards for the code you generate — Pester 6.2 throughout:
These run against this repository on every pull request, and the templates set the same gates up for yours:
-ComputerName 'MOCKSERVER' are legitimate in a mock)FailedCount and FailedContainersCount — a file that fails discovery
contributes zero failed tests and would otherwise read greenTools/ and powershell-standards/Examples/, the code this repository ships
and holds up as exemplary. Templates are excluded: they are scaffolding to copy, so covering a
placeholder measures nothing.ps1/.psm1, since a .psd1 is restricted data
and cannot invoke a cmdletCreate .instructions.md files in your project for team-specific standards:
---
applyTo: "**/*.ps1"
---
# Team-specific PowerShell standards
- Use specific naming conventions for your domain
- Include team-specific validation patterns
- Reference team tools and processes
Add custom prompts for your specific use cases:
---
agent: 'agent'
description: 'Creates infrastructure automation function'
---
Create function for infrastructure management with:
- SCOM integration
- ServiceNow ticket correlation
- Active Directory validation
See CONTRIBUTING.md for how the repository is laid out, the conventions that are easy to break, the checks to run, and how pull requests are written. Every change here reaches each consuming repository on its next sync, so open an issue first for anything larger than a fix.
No benchmark study backs this repository, so it makes no claims about what adopting it will do for your team. Measure it in your own environment instead — the quality gates emit most of what you need:
Track these before and after adoption if you want a real before/after comparison.
This project is licensed under the MIT License - see the LICENSE file for details.
Ready to transform your PowerShell development with AI-assisted enterprise standards?
🚀 Get Started Now | 📚 Read the Docs | 🤝 Contribute