chore: bring repo up to governance spec #11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/governance-up-to-spec"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Brings the repo up to a8n-run/governance spec. CLI-only items from the checklist that genuinely do not apply to this repo (
compose.yml,compose.dev.yml,.env.example,.devcontainer/, HOST_IP / HOST_PORT, port assignment, HOST_UID / HOST_GID bind-mount pattern) are intentionally skipped; PRE_COMMIT.md Template B already covers the no-dev-compose case.Root files
CLAUDE.mddescribing the repo shape for AI agents and noting which checklist items do not apply..dockerignoreso the build context excludestarget/,.git, docs, tests, and other host-only files.LICENSEtoLICENSE.md(CHECKLIST.md spelling).repository = "https://dev.a8n.run/pandoras-box/monkey"toCargo.toml. FORGEJO_ORGS.md mechanics step 2 assumes this field exists.Justfile
checkumbrella to match the spec:check = check-fmt + check-clippy + check-build + check-docker.typecheck(cargo check --all-targets).build-docker-exportthat drivesoci-build/Dockerfile'sbinaryscratch stage out to./output/monkey.fmt,lint,testas single-step shortcuts;lintnow aliasescheck-clippy.Dockerfile
ARG MONKEY_GIT_HASHtoARG GIT_SHA(the org-wide standard build-arg name) and map it toENV MONKEY_GIT_HASHsobuild.rsis unchanged.ARG CARGO_BUILD_JOBS=2+ENV CARGO_BUILD_JOBS. Default2keeps ad-hoc local builds from oversubscribing a small host; CI overrides via--build-arg./usr/local/cargo/registryand/usr/local/cargo/gitfor both the dependency-priming build and the final build. This catches what the layer cache misses on minorCargo.tomltweaks per CI.md.# syntax=docker/dockerfile:1.6so cache mounts are honored on hosts with older BuildKit defaults.Forgejo workflow (
build-oci-image.yml)docker buildx create --driver docker-container --usestep. The defaultdockerdriver does not supportcache-to type=registry.--cache-to type=inlinewith a dedicated:buildcacheregistry tag inmode=maxper CI.md.inlineonly carries the final layer's metadata;mode=maxcaptures every intermediate layer (notably the slow dep-build layer).CARGO_BUILD_JOBS = nprocthrough to both the push build and thebinaryexport build.GIT_SHAbuild-arg name.Out of scope
src/**,docs/superpowers/**,oci-build/get-tags.nu. A governance-compliance PR should not also bulk-rewrite source comments; tracked for a separate change.cargo fmt --checkdisagrees with the rustfmt baked intorust-builder-musl:v1.0.0-rust1.94-alpine. Pre-existing; thejust pre-commitrecipe runs through Docker so it matches CI exactly.Test plan
just --listshows the new umbrella + recipes.just check-dockerbuilds the builder stage end-to-end.just build-docker-exportwrites./output/monkey.just pre-commit(Docker-based) passes fmt + clippy + build + tests.Checkworkflow stays green on this PR.Build OCI containerworkflow on merge to main: buildx builder is created,:buildcachetag is published, image and generic package are pushed under the newGIT_SHAbuild-arg.Add CLAUDE.md, .dockerignore, and Cargo.toml::repository. Rename LICENSE to LICENSE.md per a8n-run/governance CHECKLIST.md. Restructure justfile around the governance check umbrella: check = check-fmt + check-clippy + check-build + check-docker. Add typecheck and build-docker-export recipes. Harden the OCI build per a8n-run/governance CI.md: rename the project-specific MONKEY_GIT_HASH build-arg to the org-standard GIT_SHA (mapped to ENV MONKEY_GIT_HASH inside the Dockerfile so build.rs is unchanged), add BuildKit cache mounts on /usr/local/cargo/{registry,git} for both the dependency and final build layers, and accept a CARGO_BUILD_JOBS ARG/ENV with a sane default of 2 for ad-hoc local builds. In .forgejo/workflows/build-oci-image.yml: set up a docker-container buildx builder (required for cache-to type=registry), switch the cache from inline to a dedicated :buildcache registry tag with mode=max, and pass CARGO_BUILD_JOBS = nproc through to both the push build and the binary-export build. CLI-only items from the checklist that do not apply to this repo are intentionally skipped: compose.yml / compose.dev.yml, .env.example, .devcontainer/, HOST_IP / HOST_PORT, port assignment, HOST_UID / HOST_GID bind-mount pattern. Governance PRE_COMMIT.md Template B already covers the no-dev-compose case. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>