diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..5bfdab4e --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,14 @@ +# Repository Agent Rules + +Follow all conventions, commands, and MSD workflow overrides in `CLAUDE.md`. + +## Release Ordering Guardrail + +Never put git release tagging, pushing release tags, downstream consumer `go.mod`/submodule bumps to new tags, or changelog publishing inside a phase execution plan (`*-PLAN.md`) or wave execution. + +Complete the full phase lifecycle first: +1. Finish all phase waves (run local E2E proofs against local checkouts using temporary `GOWORK` / `replace`, leaving submodules clean). +2. Run phase code review (`/msd-code-review `). +3. Apply and re-verify any accepted review fixes (`/msd-code-review --fix` + tests, OpenAPI, embedded `modules/boardwalk/dist`, and docs gates). +4. Pass goal-backward phase verification (`-VERIFICATION.md`). +5. Only after steps 1–4 are complete and the user gives explicit go-ahead, cut/push release tags, bump downstream consumers, and publish changelog entries. diff --git a/CLAUDE.md b/CLAUDE.md index 114473c6..0bb37fb9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -70,10 +70,11 @@ Project rules that override MSD defaults: 2. **Unit tests are the last plan of every phase.** Earlier plans may carry smoke tests but are not blocked on coverage. 3. **State through handlers.** Update `.planning/STATE.md` with `msd_run query state.*` handlers, not raw edits. 4. **g15office sync.** Todos and phase milestone tasks are mirrored in g15office (`.planning/G15OFFICE.md`); post a short comment when a phase advances. +5. **Release only after review, fixes, and verification.** Never put `git tag`, pushing release tags, bumping downstream consumer `go.mod`/submodule pointers to new tags, or publishing changelog posts inside a phase `PLAN.md` or wave execution. Run local E2E proofs in the final plan against local checkouts (e.g., temporary `GOWORK` / `replace`), then complete the full post-wave sequence first — code review (`/msd-code-review`), any review fixes (`/msd-code-review --fix` + re-verified tests/dist/OpenAPI/docs), and phase verification (`*-VERIFICATION.md`) — and only cut/push release tags, bump downstream consumers, and publish changelog posts afterward with explicit user go-ahead. ## Commits and concurrency - No co-author tags. One logical change per commit; planning docs and code in separate commits. - Several Claude sessions often work in this repo at once (different phases, quick tasks). Stage files explicitly by path (never `git add -A`), leave other sessions' uncommitted edits (often `STATE.md`, `state.json`) alone, and check for in-flight edits before touching shared files such as cabana. -- Don't push, tag or deploy without the user's go-ahead; deploys are documented per application (for example `../sm-grzybyfunkcjonalne-app/DEPLOY.md`). +- Don't push, tag or deploy without the user's go-ahead, and never tag/publish a phase release before phase code review, accepted `--fix` changes, and verification have all completed (see MSD rule 5); deploys are documented per application (for example `../sm-grzybyfunkcjonalne-app/DEPLOY.md`). - Every pushed release tag `vX.Y.Z` gets a post on https://summercms.io/changelog, the same day. From `../sm-summercmsio-app`: `scripts/changelog-post.py source vX.Y.Z` prints the tag message and the commits since the previous tag; write user-facing markdown notes from it (`## Highlights`/`## Added`/`## Changed`/`## Fixed`, no planning IDs or `quick-*` codes, no H1); then `scripts/changelog-post.py publish vX.Y.Z notes.md --excerpt "…"`. Plugin release tags get a post on https://summercms.io/changelog/plugins with `scripts/changelog-post.py publish vX.Y.Z notes.md --excerpt "…" --repo ../sm--plugin`. The script reads the `g15_` token (scoped `journal`) from `~/.config/summercms/journal-token`; never print, copy or mint one, and if the file is missing or the token is refused, ask the user. Details: `../sm-summercmsio-app/DEPLOY.md`, "Posting to the changelog".