Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 15 additions & 50 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,27 @@
# AGENTS.md

The GitHub template (`is_template: true`) that new `chorrell` repositories are
created from. It contains only shared configuration, no application code. See
[README.md](README.md) for what each file does and the checklist for new
repositories.
The `horrell-consulting` organization's `.github` repository. GitHub shows
`profile/README.md` on the organization page, and only while this repository is
public. It's a portfolio page for job applications and client work, so keep it
accurate: describe each project as its own README does, and list unfinished
projects under "In progress".

## Structure

```text
├── profile/README.md # The organization profile
├── .pre-commit-config.yaml # gitleaks, markdownlint-cli2 (Docker), hygiene hooks, zizmor
├── .markdownlint.yaml # MD013 (line length) disabled
├── .gitignore # Language-agnostic: OS files, .env*, editor dirs, .claude/settings.local.json
├── .gitattributes # * text=auto
├── AGENTS.md / CLAUDE.md # Agent guidance; CLAUDE.md only imports AGENTS.md
├── LICENSE # MPL-2.0
└── .github/
├── CODEOWNERS # * @chorrell
├── dependabot.yml # github-actions + pre-commit in one monthly `tooling` PR, 7-day cooldown
├── zizmor.yml # chorrell/* may be tag-pinned; everything else hash-pinned
└── workflows/
├── markdownlint.yml # PR stub calling chorrell/workflows markdownlint.yml@v1
├── pre-commit.yml # PR stub calling chorrell/workflows pre-commit.yml@v1
├── dependabot-automerge.yml # PR stub: auto-merges minor/patch `tooling` PRs
└── zizmor.yml # PR + main stub calling chorrell/workflows zizmor.yml@v1
└── .github/workflows/ # Stubs calling chorrell/workflows@v1: markdownlint, pre-commit, zizmor, dependabot-automerge
```

## Rules

- **Everything here is copied into every new repository.** Keep it
language-agnostic. Python, Docker, Terraform and similar hooks, Dependabot
ecosystems and ignores belong in the repositories that need them.
- **Keep this in sync with my other repositories.** When a shared default
changes (a hook, the Dependabot layout, the markdownlint stub), change it here
too, so new repositories don't start out of date.
- **Reusable workflows live in [chorrell/workflows](https://github.com/chorrell/workflows).**
Workflows here are short stubs that own their triggers, `permissions` and
`concurrency` and call the shared workflow by tag (`@v1`). Third-party actions
are pinned by commit hash with a version comment; zizmor enforces this.
- **zizmor is the workflow linter.** Reference actions and reusable workflows
in the same repository with GitHub's `$/` self-repository syntax
(`uses: $/.github/workflows/build.yml`), not `./`, as zizmor's
`self-repository` audit requires. actionlint isn't used because it rejects
`$/` ([rhysd/actionlint#711](https://github.com/rhysd/actionlint/issues/711)).
- **Repository settings aren't configured here.** Merge settings, rulesets and
required status checks are managed by Terraform in
[chorrell/github-settings](https://github.com/chorrell/github-settings)
(`repos.yaml`). Don't change them in the GitHub UI.
- **Link repositories where they live now.** When a repository moves from
`chorrell` to `horrell-consulting`, update its link here.
- **Repository settings aren't configured here.** Rulesets and required checks
are managed by Terraform in
[horrell-consulting/github-settings](https://github.com/horrell-consulting/github-settings).
- Run `prek run --all-files` before pushing (the markdownlint hook needs
Docker). CI runs markdownlint on pull requests to `main`, and zizmor on
every pull request and push to `main`. `zizmor / zizmor` is a required check
on every repository, so don't remove the zizmor stub.
- Dependabot opens one monthly `chore(deps): bump the tooling group ...` PR
for Actions and pre-commit hooks. `dependabot-automerge.yml` merges it once
checks pass if every update is minor or patch; majors wait for review. Add
other ecosystems (uv, Docker, Terraform) as separate entries, outside the
`tooling` group, so they aren't auto-merged. A repository that publishes or
deploys on pushes to `main` should drop the auto-merge stub, because merges
made with `GITHUB_TOKEN` don't trigger push workflows.
- Commits and PR titles use conventional commits (`feat: ...`, `ci: ...`,
`chore(deps): ...`). Branch from `main` with a `feature/` prefix. PRs are
squash-merged, so keep PR bodies short and focused on intent.
Docker). `zizmor / zizmor` is a required check, so keep the zizmor stub.
- Commits and PR titles use conventional commits (`feat: ...`, `docs: ...`).
PRs are squash-merged.
52 changes: 10 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,27 @@
# template-repo
# .github

[![markdownlint](https://github.com/chorrell/template-repo/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/chorrell/template-repo/actions/workflows/markdownlint.yml)
[![markdownlint](https://github.com/horrell-consulting/.github/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/horrell-consulting/.github/actions/workflows/markdownlint.yml)

The GitHub template I start new repositories from. It holds the lint,
Dependabot and pre-commit defaults every project shares, so a new repository
starts with the same baseline instead of copying files by hand.
The organization profile for
[Horrell DevOps Consulting](https://github.com/horrell-consulting).

## What's included

| File | Purpose |
| Path | Purpose |
| --- | --- |
| [`.pre-commit-config.yaml`](.pre-commit-config.yaml) | gitleaks, markdownlint-cli2, zizmor and the standard `pre-commit-hooks` hygiene checks. zizmor is the workflow linter; actionlint isn't used because it rejects GitHub's `$/` self-repository `uses:` syntax ([rhysd/actionlint#711](https://github.com/rhysd/actionlint/issues/711)) |
| [`.github/dependabot.yml`](.github/dependabot.yml) | One monthly `tooling` PR for GitHub Actions and pre-commit hook updates, with a 7-day cooldown |
| [`.github/workflows/markdownlint.yml`](.github/workflows/markdownlint.yml) | Lints Markdown on pull requests with the shared [chorrell/workflows](https://github.com/chorrell/workflows) workflow |
| [`.github/workflows/pre-commit.yml`](.github/workflows/pre-commit.yml) | Runs every pre-commit hook on pull requests, so hook updates are tested |
| [`.github/workflows/dependabot-automerge.yml`](.github/workflows/dependabot-automerge.yml) | Auto-merges the Dependabot `tooling` PR once checks pass, when every update is minor or patch |
| [`.github/workflows/zizmor.yml`](.github/workflows/zizmor.yml) | Audits GitHub Actions workflows with zizmor on pull requests and pushes to `main`, using the shared chorrell/workflows workflow |
| [`.github/zizmor.yml`](.github/zizmor.yml) | Lets `chorrell/*` reusable workflows be pinned by tag; everything else must be pinned by commit hash |
| [`.github/CODEOWNERS`](.github/CODEOWNERS) | Requests my review on every change |
| [`.markdownlint.yaml`](.markdownlint.yaml) | Markdown lint rules (line length is not enforced) |
| [`.gitignore`](.gitignore) / [`.gitattributes`](.gitattributes) | Language-agnostic ignores and LF normalization |
| [`AGENTS.md`](AGENTS.md) / [`CLAUDE.md`](CLAUDE.md) | Guidance for coding agents; `CLAUDE.md` imports `AGENTS.md` |
| [`LICENSE`](LICENSE) | Mozilla Public License 2.0 |

## Creating a repository from this template

```sh
gh repo create chorrell/<name> --template chorrell/template-repo --public --clone
```

Then:
| [`profile/README.md`](profile/README.md) | The profile shown on the organization's GitHub page |

1. Retitle this README and describe the new project.
2. Rewrite `AGENTS.md` for the project. Keep `CLAUDE.md` as it is.
3. Add language-specific pre-commit hooks (ruff, shellcheck, hadolint,
terraform, ...) and Dependabot ecosystems (`docker`, `uv`, `terraform`, ...).
4. Add language-specific entries to `.gitignore`.
5. Check that `CODEOWNERS` and `LICENSE` still fit.
6. Add the repository to
[chorrell/github-settings](https://github.com/chorrell/github-settings)
(its daily bot proposes it), with any CI checks it should require beyond
`zizmor / zizmor`, which every repository requires.
Repository settings and rulesets for this organization are managed by Terraform
in [horrell-consulting/github-settings](https://github.com/horrell-consulting/github-settings).

## Local development

Install [prek](https://github.com/j178/prek) (`brew install prek`), a faster
drop-in replacement for pre-commit, and run the hooks before pushing:
Install [prek](https://github.com/j178/prek) (`brew install prek`) and run the
hooks before pushing. The markdownlint hook runs in Docker.

```sh
prek install
prek run --all-files
```

The markdownlint hook runs in Docker, so Docker needs to be running.

## License

[MPL-2.0](LICENSE)
43 changes: 43 additions & 0 deletions profile/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Horrell DevOps Consulting

Independent DevOps consulting and contract infrastructure work by
[Christopher Horrell](https://www.linkedin.com/in/christopherhorrell/), based in
Toronto. I help early-stage engineering teams spend less on AWS, ship faster
through better CI/CD, and put their infrastructure on a footing that scales.

## What I do

- **AWS cost optimization:** spot and Graviton capacity, right-sizing, and
build fleets that only run while there's work to do.
- **CI/CD modernization:** fast, secure pipelines with shared workflows,
pinned dependencies, and self-hosted runners where they pay off.
- **Infrastructure as code:** Terraform and HCP Terraform with guard rails:
policy checks, apply-on-merge, and nothing deleted by accident.
- **DevOps leadership:** setting direction, writing the golden path, and
mentoring the team that runs it.

## Work you can look at

| Repository | What it shows |
| --- | --- |
| [github-settings](https://github.com/horrell-consulting/github-settings) | Governance as code: every repository in this organization is configured, protected and onboarded by Terraform on HCP Terraform, with a Sentinel deletion guard and a GitHub App bot |
| [packer-aws-windows-openssh](https://github.com/chorrell/packer-aws-windows-openssh) | Packer (HCL2) templates for encrypted, key-only-SSH Windows Server 2022 and 2025 AMIs with Fast Launch, built and tested in CI |
| [docker-node-minimal](https://github.com/chorrell/docker-node-minimal) | A `FROM scratch` Node.js image with a static binary compiled from source, multi-arch, rebuilt automatically for every supported release |

### In progress

| Repository | What it will show |
| --- | --- |
| [eks-spot-runners](https://github.com/chorrell/eks-spot-runners) | Ephemeral GitHub Actions runners on EKS spot instances (amd64 and arm64/Graviton) for cheap multi-platform Docker builds |
| [doks-runners](https://github.com/chorrell/doks-runners) | A low-cost, always-available self-hosted runner fleet on DigitalOcean Kubernetes |

The CI behind all of these comes from shared, versioned workflows in
[chorrell/workflows](https://github.com/chorrell/workflows), and new
repositories start from [chorrell/template-repo](https://github.com/chorrell/template-repo).

## Get in touch

- **LinkedIn:** [christopherhorrell](https://www.linkedin.com/in/christopherhorrell/)
- **Website and blog:** [horrell.ca](https://horrell.ca)

Available for contract and fractional DevOps leadership work.
Loading