- Node.js 22 or newer
- npm (the version bundled with your Node.js installation is sufficient)
- Git
- GitHub CLI (
gh) only for manual authentication or repository checks
The automated test suite does not require GitHub credentials and must not mutate live repositories.
git clone https://github.com/T50-Systems/pi-github-admin.git
cd pi-github-admin
npm ci
npm run typecheck
npm testUse npm ci, rather than npm install, when verifying a clean checkout so the
committed lockfile is honored exactly.
-
Create a focused branch from current
main. Existing branches use prefixes such asdocs/,feat/, andrelease/; choose the prefix that matches the change. -
Keep a pull request limited to one coherent concern and reference the applicable issue.
-
Put shared input types in
src/types.ts, GitHub behavior insrc/api.ts, and Pi tool registration/schema code insrc/tools.ts. -
Add or update tests under
tests/. -
Run the same checks as CI before committing. Workflow validation is offline after
npm ci; provenance and pin review are documented indocs/WORKFLOW_VALIDATION.md:npm run verify:workflows npm run verify npm audit --audit-level=high npm pack --dry-run
-
Run
npm run benchmarkfor changes to parsing, matching, response shaping, or composite planning and report any material median change. -
Follow
docs/RELEASING.mdfor version, changelog, tag, and upgrade requirements.
See docs/ARCHITECTURE.md for module boundaries and
extension rules.
- Prefer unit tests for parsing, matching, safety decisions, and response shaping.
- Exercise mutations with
dryRun: truewhenever possible. A dry-run test must prove the operation can describe its intended change without credentials or network access. - Do not use personal access tokens, real authorization headers, or production repository data in fixtures or snapshots.
- If a live integration check is unavoidable, use a disposable repository, record the manual steps in the pull request, and clean up through the normal GitHub review process.
The extension resolves credentials in this order:
GITHUB_TOKENGH_TOKENgh auth token
Prefer the least-privileged, short-lived credential that can perform the check.
Never commit .env files, tokens, command output containing tokens, or local
Pi authentication files. Run gh auth status to diagnose CLI authentication;
do not paste gh auth token output into an issue or pull request.
- The change is linked to an existing issue when one applies.
- Mutating behavior supports and tests
dryRun. - No credentials or sensitive response data are logged or committed.
-
npm run verifypasses, beginning with offline workflow validation and then coverage and release metadata checks. -
npm audit --audit-level=highpasses. -
npm pack --dry-runcontains only intended publish files. - Performance-sensitive changes include benchmark evidence.
- Documentation and examples match the implemented behavior.