feat: add ship release and deploy skill

This commit is contained in:
bryanpedini committed 2026-11-21 18:38:15 +01:00
1 parent 3d7e3adea1
commit a9087b29f4
6 files changed
+216

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
# Shared rules for every subagent brief
Paste this block, adapted, at the end of every brief.
```
Hard rules:
- DO NOT PUSH, do not create remote repos, do not tag remotely, do not deploy. The master agent does all of that after review.
- Touch only your own repo. Other repos of this release are read only for you (another agent may be rewriting their history: no git commands that modify them).
- Builds, tests and toolchains run ONLY in Docker, never on the host (no host go/node/npm). Reuse named volumes for module/build caches, e.g. -v <name>-gomod:/go/pkg/mod -v <name>-gocache:/root/.cache/go-build.
- Before starting, record `docker images`, `docker volume ls`, `docker buildx ls` in your scratchpad. At the end remove every container, network, volume, buildx builder you created and every image you pulled or built that was not present before, then run `docker builder prune -f` for the build cache (in-use cache is never removed; parallel runs just rebuild). Do not remove pre-existing images, volumes or containers.
- Commits: conventional, lowercase, imperative, optional scope, no trailing period (feat:, fix:, docs:, ci:, build:, chore:, test:, refactor:). One purpose per commit. New repos start with a commit named exactly `first commit` containing only LICENSE and a one-line README.md. Author/committer is the git global identity (Bryan Joshua Pedini). NO Co-Authored-By and no AI attribution trailers of any kind.
- Files: no code comments except the two-line SPDX header on hand-written code files (dockerfile, makefile, scripts, source code), directly under the shebang if any, then one blank line:
# SPDX-License-Identifier: <MIT for packaging/deployment repos, the project's license for source repos>
# Copyright (C) 2026 Bryan Joshua Pedini
Comment syntax follows the file type. Config files (yaml, go.mod, .gitignore, README, LICENSE) get no header. File names: lowercase `dockerfile` and `makefile` (makefile starts with `#!make` then the header) unless the repo already uses another spelling.
- Text: English, concise, no em dash anywhere, no emojis.
- Never print or commit secrets. Tokens go through env vars or BuildKit secrets, never build args, layers, logs or files in the repo.
- Report at the end: file list with a short description, commit list (hash + subject), exact build/test commands and results, anything the master must fill in or configure.
```
## Environment facts for the master
- Gitea: git.bjphoster.com. Orgs: `source` (source code, GPL-2.0-or-later for Bryan's own code, upstream license kept for forks), `docker` (packaging repos building OCI images, MIT), `deployments` (compose stacks, MIT). Repos are private by default; package visibility follows the org.
- `gt` CLI = Gitea CLI, logged in as site admin: `gt api /repos/<org>/<repo>`, `gt api -X POST /orgs/<org>/repos -d '{...}'`, `gt api -X PATCH /repos/<org>/<repo> -d '{"has_actions":true,"has_packages":true}'`.
- Actions conventions (reference: docker/coredns-mysql, source/coredns-web-ui): vars `GIT_HOST`, `GIT_NAME`, `GIT_EMAIL`, `REGISTRY_USER`, secret `GIT_TOKEN` (some repos use `GITEA_TOKEN`; follow the reference repo you copy). Set them per repo via `gt api` (`/repos/<o>/<r>/actions/variables/<NAME>`, `/repos/<o>/<r>/actions/secrets/<NAME>`) if missing; never echo the token.
- Runner: act_runner using the host Docker socket, amd64, job image ubuntu-latest. arm64 images are built by Go cross-compilation (`FROM --platform=$BUILDPLATFORM`, `GOARCH=$TARGETARCH`) with a runtime stage that runs no RUN steps under emulation, plus `docker buildx` (docker-container driver) for the multi-arch manifest. Do not rely on QEMU.
- Deployment conventions: compose file starts with `---`; single HTTPS Traefik router only (labels under `### Section Træfik`, router `https-${TRAEFIK_ROUTER}`, `${TRAEFIK_MIDDLEWARES}`, `${TRAEFIK_MATCHRULE}` holding the full `Host(\`...\`)` in env, `tls=${TRAEFIK_TLSENABLED}`, `tls.certresolver=${TRAEFIK_CERTRESOLVER}`, service port label), external network `${TRAEFIK_NETWORK}`, no HTTP router, no Diun labels, no build in compose, `env.example` with a `# Træfik` block, `.gitignore` covering `.env` and the data dir, README with a Usage section. References: deployments/netbox-mcp-server, deployments/coredns-web-ui.
- Hosts: stacks live in `/srv/<fqdn>`, owned by root, cloned from Gitea over HTTPS. Traefik per host in `/srv/<host>-traefik.<domain>` style dirs, certresolver usually `letsencrypt` (deSEC DNS challenge), middleware `hsts` defined by Traefik's own labels. `*.infra.bjphoster.cloud` resolves only internally.