From 5aa9eb9426bb77ff02f5bed7b6a8fe5eac0f177c Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Sat, 14 Feb 2026 16:44:44 +0000 Subject: [PATCH] chore: incorporate relevant agentbox skel files Add relevant skeleton files from rcarmo/agentbox/skel for this repo: - .github/workflows/ci.yml (Makefile checks + conditional Go tests) - .github/instructions/{00-project-detection,docker-image,frontend-bun,go,python}.instructions.md Instruction files were adapted where needed to match current workflow names and repository layout (Go module under go/, Docker workflow filename). Validated with make check and go test ./... . Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../00-project-detection.instructions.md | 8 ++++ .../instructions/docker-image.instructions.md | 12 ++++++ .../instructions/frontend-bun.instructions.md | 10 +++++ .github/instructions/go.instructions.md | 11 ++++++ .github/instructions/python.instructions.md | 12 ++++++ .github/workflows/ci.yml | 37 +++++++++++++++++++ 6 files changed, 90 insertions(+) create mode 100644 .github/instructions/00-project-detection.instructions.md create mode 100644 .github/instructions/docker-image.instructions.md create mode 100644 .github/instructions/frontend-bun.instructions.md create mode 100644 .github/instructions/go.instructions.md create mode 100644 .github/instructions/python.instructions.md create mode 100644 .github/workflows/ci.yml diff --git a/.github/instructions/00-project-detection.instructions.md b/.github/instructions/00-project-detection.instructions.md new file mode 100644 index 0000000..0e4cc03 --- /dev/null +++ b/.github/instructions/00-project-detection.instructions.md @@ -0,0 +1,8 @@ +# Project-type detection + +Use these heuristics to decide which other instruction files apply: + +- If `pyproject.toml` or `requirements*.txt` exists -> apply `python.instructions.md`. +- If `go.mod` exists -> apply `go.instructions.md`. +- If `Dockerfile` exists and CI is publishing images -> apply `docker-image.instructions.md`. +- If `package.json` exists (or Bun is referenced) -> apply `frontend-bun.instructions.md`. diff --git a/.github/instructions/docker-image.instructions.md b/.github/instructions/docker-image.instructions.md new file mode 100644 index 0000000..4c5ccb6 --- /dev/null +++ b/.github/instructions/docker-image.instructions.md @@ -0,0 +1,12 @@ +# Docker image project instructions + +Applies when: this repo builds/publishes a Docker image. + +## CI/CD +- Use `.github/workflows/docker.yml` (multi-arch by digest + manifest merge) as the baseline in this repository. +- Tags `v*` are the release boundary. + +## Conventions +- Keep Docker build args/env documented in README. +- Prioritize building minimal images, taking advantage of caching and layers to remove build artifacts. +- Prefer reproducible builds (minimize network fetches at runtime; pin versions when practical). diff --git a/.github/instructions/frontend-bun.instructions.md b/.github/instructions/frontend-bun.instructions.md new file mode 100644 index 0000000..be07500 --- /dev/null +++ b/.github/instructions/frontend-bun.instructions.md @@ -0,0 +1,10 @@ +# Frontend (Bun/Node) instructions + +Applies when: this repo has `package.json` and a JS/TS build step. + +## Makefile-first workflow +- Expose frontend workflows via Make targets (`typecheck`, `build`, `build-fast`, `bundle-watch`, `bundle-clean`). +- Keep CI invoking those targets (or `make check` if it wraps them). + +## Conventions +- Bun is preferred for install/build when available. diff --git a/.github/instructions/go.instructions.md b/.github/instructions/go.instructions.md new file mode 100644 index 0000000..26ae1dd --- /dev/null +++ b/.github/instructions/go.instructions.md @@ -0,0 +1,11 @@ +# Go project instructions + +Applies when: this repo has `go.mod`. + +## Makefile-first workflow +- CI should run `make check` and Go tests (`cd go && go test ./...` in this repository). +- Put `golangci-lint` and `gosec` wiring behind Make targets when introduced. + +## Conventions to implement +- `make test` should run `go test ./...` (prefer `-race` and coverage in CI). +- Avoid bespoke CI steps when a Make target can encode the same behavior. diff --git a/.github/instructions/python.instructions.md b/.github/instructions/python.instructions.md new file mode 100644 index 0000000..ce1138c --- /dev/null +++ b/.github/instructions/python.instructions.md @@ -0,0 +1,12 @@ +# Python project instructions + +Applies when: this repo has `pyproject.toml` or `requirements*.txt`. + +## Makefile-first workflow +- Prefer `make check` as the default validation gate. +- If you add/change tooling, wire it through Make targets (don't ask users to run raw `pytest`/`ruff`). + +## Conventions to implement +- Prefer `ruff` for lint+format. +- Prefer `python -m pytest` (and `--cov` for coverage) via Make targets. +- Keep CI calling Make targets, not raw commands. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1f109e7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + pull_request: + push: + branches: [ main ] + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + # Prefer Makefile targets; this is intentionally generic. + - name: Run checks + run: | + set -e + if make -n check >/dev/null 2>&1; then + make check + elif make -n lint >/dev/null 2>&1 && make -n test >/dev/null 2>&1; then + make lint && make test + else + echo "No Makefile check/lint/test targets found; skipping." + fi + + - name: Run Go tests (if present) + run: | + set -e + if [ -f go/go.mod ]; then + (cd go && go test ./...) + elif [ -f go.mod ]; then + go test ./... + else + echo "No Go module found; skipping." + fi