Add AGENTS.md, symlink CLAUDE.md to it - #5
Conversation
Generated repo documentation with `claude /init` and consolidated it into AGENTS.md so every agent tool reads the same file. CLAUDE.md is now a symlink to AGENTS.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015UvT1zcFsTdKbKcFbdkFiD
| - The push-to-`main` path (`github.ref == 'refs/heads/main'`) only bumps the tag in | ||
| **prod-k8s**. It builds nothing — it reuses the `sha-<short-sha>` image that the PR | ||
| run already pushed to GHCR. Removing the PR-time push would silently break prod | ||
| deploys. |
There was a problem hiding this comment.
This describes the prod path as working, but the tag it writes points at an image that was never pushed.
docker/metadata-action's type=sha produces sha-<7> from the PR's head commit — on pull_request events the action overrides GITHUB_SHA with github.event.pull_request.head.sha. The push-to-main run then writes:
yq -i ".image.tag = \"sha-${GITHUB_SHA::7}\"" test-app.helm_values.yaml
where GITHUB_SHA is the new merge/squash commit on main — a SHA nothing was ever built for, since every build step in docker.yml is gated on github.event_name == 'pull_request'. GitHub's merge always creates a new commit, so this can never coincide with the PR-run tag.
The same mismatch hits the dev path inside the PR run itself: build-push-action tags with the head SHA, while the adjacent yq step three steps later writes ${GITHUB_SHA::7}, which on pull_request is the refs/pull/N/merge SHA. Two different SHAs, one image.
This is a pre-existing docker.yml bug, not something this PR introduces. But AGENTS.md is the file future agents will trust over reading the workflow, and as written it asserts the opposite of what happens — including the instruction to preserve it ("Removing the PR-time push would silently break prod deploys"). Suggest documenting the tag mismatch as a known break instead, so an agent that notices it doesn't "fix" the doc back.
| Two caveats in that step: it installs `yq` via `apt` **without `sudo`**, which does not | ||
| work as-is on a non-root GitHub-hosted runner; and those deploy repos are under the | ||
| `evanstucker-hates-2fa` org while `origin` is now `3uzbcqje/test-app`. |
There was a problem hiding this comment.
apt installs curl, not yq. The actual step is:
apt update && apt install -y --no-install-recommends curl
curl -sL -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64" && chmod +x /usr/local/bin/yqyq comes from a pinned GitHub release binary. The conclusion is right — the step does fail unprivileged on a hosted runner — but the cause is misattributed, and there are two root-path operations, not one: apt update/apt install, and the write to /usr/local/bin. An agent sent to fix "installs yq via apt" will go looking for a line that doesn't exist.
| @@ -0,0 +1 @@ | |||
| AGENTS.md No newline at end of file | |||
There was a problem hiding this comment.
Minor portability note on the symlink (mode 120000): it resolves correctly on Linux/macOS — I confirmed the checkout in CI reads through it to the 4878-byte AGENTS.md.
On Windows it won't. Git for Windows sets core.symlinks=false unless the user enabled symlinks at install time (needs Developer Mode or admin), and checks the entry out as a regular 9-byte text file containing the literal string AGENTS.md. Claude Code then loads a CLAUDE.md whose entire content is the word AGENTS.md — no error, no warning, just silently empty instructions. Same failure mode for any tool that reads the path without resolving links.
If Windows checkouts are in scope for this sweep, a regular file containing Claude Code's import directive is portable and keeps the single source of truth:
| AGENTS.md | |
| @AGENTS.md |
Not a blocker if the repos are Linux/macOS only.
ReviewDocs-only PR, so the review is about whether the claims in Most of it holds up. Verified accurate: no source code / no Three things to fix:
No security issues. Nothing leaks secret material, and the doc actively documents the workflow permission scoping as intentional, which is the right instinct for a file like this. One note on the PR description: it says |
Ran
claude /initin this repo, merged the generatedCLAUDE.mdintoAGENTS.md, and replacedCLAUDE.mdwith a symlink toAGENTS.md.Part of a sweep across all non-fork repos in
3uzbcqje,devopscoop, and6j0-orgto give every repo a single agent-instructions file that all tools read.🤖 Generated with Claude Code
https://claude.ai/code/session_015UvT1zcFsTdKbKcFbdkFiD