Pharrington/proferredbucket / copilot-instructions.md
Pharrington's picture
|
download
raw
4.4 kB

Purpose

This file teaches GitHub Copilot CLI how to inspect and operate on this repository. The repo currently contains only the .github directory; no language-specific manifests (package.json, pyproject.toml, go.mod, Cargo.toml, Makefile, etc.) were found at analysis time. Update this file when new code or manifests are added.

  1. Build, test, and lint commands (discovery + examples)
  • Discovery order

    • Look for manifests at repo root or first-level dirs: package.json, pnpm-workspace.yaml, turbo.json, pyproject.toml, setup.py, requirements.txt, Pipfile, go.mod, Cargo.toml, pom.xml, build.gradle, Makefile, Dockerfile.
    • Check .github/workflows for CI jobs and script commands.
  • Node (package.json)

    • Install: npm ci or pnpm install
    • Full test: npm test or npm run test
    • Single test examples:
      • Jest: npx jest path/to/file.test.js -t "test name"
      • Mocha: npx mocha path/to/file.test.js --grep "test name"
    • Lint: npm run lint (or npx eslint src/file.js)
  • Python (pyproject.toml / pytest)

    • Install: python -m pip install -r requirements.txt or pipx/poetry as project uses
    • Full test: pytest
    • Single test: pytest path/to/test_file.py::TestClass::test_name or pytest -k test_name
    • Lint: flake8 path/to/file.py or ruff path/to/file.py
  • Go

    • Build/test: go build ./... && go test ./...
    • Single test: go test ./pkg/path -run TestName
    • Lint: golangci-lint run
  • Rust

    • Build/test: cargo build && cargo test
    • Single test: cargo test test_name --test test_binary
    • Lint: cargo clippy
  • Java/Gradle/Maven

    • Gradle test: ./gradlew test
    • Single test (Gradle): ./gradlew test --tests "com.example.TestClass.testMethod"
  • Generic Makefile / Docker

    • Use make if Makefile present
    • Dockerized projects: inspect docker-compose.yml and Dockerfile for build/test targets

If an ecosystem is detected, prefer invoking the canonical tooling first (npm/pnpm/yarn, poetry/pip, go, cargo, gradle/mvn). When unsure, consult .github/workflows to mirror CI commands.

  1. High-level architecture (how to infer the big picture)
  • Look for these common layouts and infer intent:

    • Monorepo (packages/, packages/*/package.json, workspaces in package.json or pnpm-workspace.yaml)
    • Polyglot repo (top-level dirs named python/, go/, rust/, java/ or services/ with service-specific manifests)
    • Single-service app: src/ or cmd/ or app/ with a single manifest at root
    • Library package: src/ or lib/ with tests colocated and simple manifest
    • Backend service: cmd/, internal/, pkg/, api/ and Dockerfile
    • Frontend app: package.json + src/ + public/ + vite/webpack config
  • When summarizing architecture to humans or other agents, include detected languages, top-level services/packages, CI matrix entries, and test/lint commands found.

  1. Key conventions for this repository (explicit rules to follow)
  • Commit trailer: All generated commits created by tools or the assistant must include the Co-authored-by trailer exactly as: Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com (Add this to the commit message body.)

  • When adding or modifying CI or manifest files, ensure local test/lint commands are mirrored in .github/workflows to prevent divergence.

  • If adding a new language or service, update this file with the recommended build/test/lint commands and any required environment setup.

  • When running or suggesting single-test commands, prefer path-qualified invocation (file::test or file -t) so Copilot's suggested commands are precise.

  1. Other AI assistant configs to incorporate
  • Check for and merge important bits from these files, if they appear later: CLAUDE.md, .cursorrules, AGENTS.md, CONVENTIONS.md, AIDER_CONVENTIONS.md, .clinerules, .windsurfrules
  1. Practical tips for Copilot sessions in this repo
  • Always perform a quick scan for manifests and CI before proposing commands.
  • When making changes across CI/manifests/tests, run the corresponding local commands to validate behavior.
  • If asked to generate code, prefer minimal, well-tested diffs and add/adjust tests to cover changes.

Summary

Created guidance for discovery of build/test/lint commands, heuristics to infer architecture, and repository-specific rules (notably the required commit trailer). Update this file when the repository gains source code or CI workflows so future Copilot sessions can be more specific.

Xet Storage Details

Size:
4.4 kB
·
Xet hash:
d17d6c84e61cfdb0db882d3ff6366600f1cdaf7cde8439f5b29a059a13b5bb2e

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.