|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Thanks for taking the time. This repository bootstraps AI coding-agent |
| 4 | +configuration on a machine or a repo, so a broken change costs someone their |
| 5 | +working setup. That shapes the rules below. |
| 6 | + |
| 7 | +## Ground rules |
| 8 | + |
| 9 | +- **Idempotence is the contract.** Every script must be safe to re-run. Never |
| 10 | + overwrite an existing file or an existing settings key that holds a different |
| 11 | + value — skip it and report what was skipped and why. |
| 12 | +- **No silent installs.** Do not download or install binaries on the user's |
| 13 | + behalf. Detect, report, and let the user decide. |
| 14 | +- **No secrets.** No API keys, tokens, tenant ids, or internal hostnames, not |
| 15 | + even as placeholders that look real. |
| 16 | + |
| 17 | +## Making a change |
| 18 | + |
| 19 | +1. Fork the repository and branch off `main`. |
| 20 | +2. Keep the change scoped to one problem. Two unrelated fixes are two pull requests. |
| 21 | +3. Run the script you touched on a clean machine or a throwaway profile, then run |
| 22 | + it a second time to prove it is idempotent. |
| 23 | +4. Update `README.md` when behaviour or usage changes. |
| 24 | +5. Open a pull request and fill in the template, including what you actually ran. |
| 25 | + |
| 26 | +## PowerShell style |
| 27 | + |
| 28 | +- `Set-StrictMode -Version Latest` and `$ErrorActionPreference = 'Stop'` at the top |
| 29 | +- Approved verbs for function names (`Get-`, `Set-`, `Test-`, `Install-`) |
| 30 | +- Full parameter names in scripts — no positional guessing, no aliases |
| 31 | +- Prefer `Test-Path` guards over `try`/`catch` for expected conditions |
| 32 | +- The pull-request CI runs PSScriptAnalyzer; warnings and errors block the merge |
| 33 | + |
| 34 | +## Adding a provider |
| 35 | + |
| 36 | +Providers live under `providers/<name>/` and each ships its own `install.ps1`. |
| 37 | +A new provider should follow the layout of an existing one, stay idempotent, and |
| 38 | +be selectable through `.\init.ps1 -Provider <name>`. |
0 commit comments