These instructions apply to every coding agent working in this repository.
- Simplicity: Prioritize the simplest solution.
- No Duplication: Reuse existing functionality.
- TDD: Practice Test-Driven Development. Understand desired behavior -> Test -> Implement.
- ALWAYS run
make checkbefore requesting a commit.- This runs formatters, linters, tests, and generators.
- If
make checkchanges files, include them in the commit.
- Use
maketargets:make test,make lint,make fix,make format. - Use
make formatinstead of individual formatting tools (e.g.,gofmt,goimports).
- Keep main branch history flat (no merge commits).
- Use rebase to integrate upstream changes (
git pull --rebase). - Use fast-forward merges to main (
git merge --ff-only). - Reuse fixed worktree paths (e.g.,
../<repo>-wt-1,../<repo>-wt-2) instead of per-issue paths (../<repo>-issue-<N>) so Bazel reuses output bases.
- Single module, single tag: This repository uses a single root
go.modand a single monorepo-wide Semantic Versioning tag (vMAJOR.MINOR.PATCH) at the repository root. Do not create per-tool tags or splitdevtools/into separate Go submodules. - Bump rules:
MAJOR: Any breaking change in a released tool or shared package (devtools/pkg/...).MINOR: Backwards-compatible new features or tools.PATCH: Backwards-compatible fixes or internal/documentation updates.
- Shared version: Unchanged tools sharing a bumped version (and being byte-identical across consecutive releases) is expected and acceptable.
- Binary version reporting: Go binaries under
devtools/should report their version viagithub.com/chorong-sh/chorong/pkg/version(-ldflags "-X github.com/chorong-sh/chorong/pkg/version.Version=..."withruntime/debug.ReadBuildInfo()fallback). - Release workflow:
release-pleasemaintains a Release PR onmainupdatingCHANGELOG.mdand.release-please-manifest.jsonfrom Conventional Commits (bump-minor-pre-major: trueduring0.x; override with aRelease-As: X.Y.Zcommit footer). CuttingvX.Y.Zrequires squash-merging the Release PR; seedevtools/README.orgfor the checklist.
This repository squash-merges with the pull request title and description
as the commit message. HTML comments (<!-- ... -->) in the PR body are
copied into git log even though GitHub hides them in the rendered
description.
When creating or updating a PR:
- Do not copy
<!-- ... -->hints from.github/pull_request_template.mdinto the submitted body. They are compose-time hints only. - Delete unused optional sections instead of leaving them empty.
A workflow strips leftover comments from the stored body as a backstop. Other repositories can call the same workflow (pin the SHA):
jobs:
strip:
permissions:
contents: read
pull-requests: write
uses: jaeyeom/experimental/.github/workflows/strip-pr-html-comments.yml@<sha>- For multi-step workflows: use the project-local
.tmp/directory (gitignored) instead of$TMPDIRwhen a temp file must be referenced across several commands.mkdir -p .tmp echo "data" > .tmp/myfile # Safe to reference .tmp/myfile in any subsequent command