From d880a3e228d6e7d36fc0ebf4c7c28b108131f550 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 9 Sep 2026 08:13:40 +1000 Subject: [PATCH 1/2] [#3107] Replaced the drifted script snippet in '.vortex/CLAUDE.md' with a pointer to 'script-boilerplate.sh'. --- .vortex/CLAUDE.md | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/.vortex/CLAUDE.md b/.vortex/CLAUDE.md index 404939ef6..232971239 100644 --- a/.vortex/CLAUDE.md +++ b/.vortex/CLAUDE.md @@ -57,26 +57,20 @@ install it and run the shipped scripts from `vendor/bin/vortex-*`. - **Manual** - `tooling/playground/` holds scripts that hit live services (Slack, JIRA, New Relic). Not automated; see `tooling/playground/README.md`. -**Script pattern** (shipped tooling scripts and `scripts/` provision subscripts): - -```bash -#!/usr/bin/env bash -# Environment loading -t=$(mktemp) && export -p >"${t}" && set -a && . ./.env && set +a && . "${t}" && rm "${t}" - -set -eu -[ "${VORTEX_DEBUG-}" = "1" ] && set -x - -# Variables with defaults -VAR="${VAR:-default}" - -# Helpers -info() { printf "[INFO] %s\n" "${1}"; } -task() { printf " > %s\n" "${1}"; } -note() { printf " %s\n" "${1}"; } - -# Main execution -``` +**Script pattern**: the structure, the variable block and the five output +helpers live in the boilerplate at +`.vortex/docs/content/contributing/maintenance/script-boilerplate.sh`. Copy +them from there - every script in `tooling/src/` matches it byte for byte. + +The boilerplate leaves out two things the repository's scripts carry: + +- Scripts in `tooling/src/` begin with an `.env` loading line placed above + `set -eu`. Copy it verbatim from any script in that directory. +- The `scripts/provision-*.sh` subscripts define the same five helpers with + indented arrow prefixes instead of the boilerplate's `[INFO]`, `[TASK]`, + `[ OK ]` and `[FAIL]` labels. Copy them from an existing subscript such as + `scripts/provision-30-search-index.sh`; converting them to the boilerplate + form changes stdout that the tests assert on. **Output helpers** - every `task` MUST be closed by a `pass` or a `fail`. A task announces work that is starting, so it always reports its outcome; a `task` From fb8fe765bffcd87057c787ed2f35266fe492b179 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 9 Sep 2026 08:21:17 +1000 Subject: [PATCH 2/2] Addressed code review: scoped the 'byte for byte' claim to the five helper definitions. --- .vortex/CLAUDE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vortex/CLAUDE.md b/.vortex/CLAUDE.md index 232971239..fe8363d5e 100644 --- a/.vortex/CLAUDE.md +++ b/.vortex/CLAUDE.md @@ -60,7 +60,8 @@ install it and run the shipped scripts from `vendor/bin/vortex-*`. **Script pattern**: the structure, the variable block and the five output helpers live in the boilerplate at `.vortex/docs/content/contributing/maintenance/script-boilerplate.sh`. Copy -them from there - every script in `tooling/src/` matches it byte for byte. +them from there - the five helper definitions are byte-identical in the +boilerplate and in every script in `tooling/src/`. The boilerplate leaves out two things the repository's scripts carry: