diff --git a/.agents/skills/submit-for-review/SKILL.md b/.agents/skills/submit-for-review/SKILL.md index f031964..b7b281e 100644 --- a/.agents/skills/submit-for-review/SKILL.md +++ b/.agents/skills/submit-for-review/SKILL.md @@ -32,7 +32,25 @@ If the current branch matches any of the above, **abort immediately** and say: ## Step 2 — Type-check gate -Run: +First, move to the repository root so the command resolves against the correct Makefile / project config: + +``` +cd "$(git rev-parse --show-toplevel)" +``` + +Then verify the make target exists before running it. Extract the target name from `make check` (e.g. `make check` → `check`) and run: + +``` +make -n 2>/dev/null +``` + +If `make -n` exits non-zero, **stop** and say: + +> "`make check` failed — the make target does not exist in the root Makefile. Add it and retry, or run `/setup` to reconfigure." + +Do not improvise a replacement command. Do not proceed. + +If the target exists, run: ``` make check ``` @@ -171,6 +189,18 @@ Wait for the review to complete and report its verdict. ## Step 8 — Act on verdict +Before merging, verify the merge target exists. Move to the repo root, extract the target name from `make merge` (e.g. `make merge` → `merge`), and run: + +``` +cd "$(git rev-parse --show-toplevel)" && make -n 2>/dev/null +``` + +If `make -n` exits non-zero, **stop** and say: + +> "`make merge` failed — the make target does not exist in the root Makefile. Add it and retry, or run `/setup` to reconfigure." + +Do not improvise a replacement command (e.g. do not fall back to `gh pr merge`). Do not proceed. + Merge command (used by all paths below): `make merge` --- @@ -325,4 +355,4 @@ If a single `gh issue create` call fails, report the failure for that finding an - `/submit-for-review` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - The follow-up issue offer in Step 9 runs only after a successful merge and only when the review produced non-blocking findings. Never prompt the user for follow-ups when the review blocked the merge — those findings should be fixed, not ticketed. - + diff --git a/.claude/commands/submit-for-review.md b/.claude/commands/submit-for-review.md index cb9f0ce..82a6a32 100644 --- a/.claude/commands/submit-for-review.md +++ b/.claude/commands/submit-for-review.md @@ -27,7 +27,25 @@ If the current branch matches any of the above, **abort immediately** and say: ## Step 2 — Type-check gate -Run: +First, move to the repository root so the command resolves against the correct Makefile / project config: + +``` +cd "$(git rev-parse --show-toplevel)" +``` + +Then verify the make target exists before running it. Extract the target name from `make check` (e.g. `make check` → `check`) and run: + +``` +make -n 2>/dev/null +``` + +If `make -n` exits non-zero, **stop** and say: + +> "`make check` failed — the make target does not exist in the root Makefile. Add it and retry, or run `/setup` to reconfigure." + +Do not improvise a replacement command. Do not proceed. + +If the target exists, run: ``` make check ``` @@ -166,6 +184,18 @@ Wait for the review to complete and report its verdict. ## Step 8 — Act on verdict +Before merging, verify the merge target exists. Move to the repo root, extract the target name from `make merge` (e.g. `make merge` → `merge`), and run: + +``` +cd "$(git rev-parse --show-toplevel)" && make -n 2>/dev/null +``` + +If `make -n` exits non-zero, **stop** and say: + +> "`make merge` failed — the make target does not exist in the root Makefile. Add it and retry, or run `/setup` to reconfigure." + +Do not improvise a replacement command (e.g. do not fall back to `gh pr merge`). Do not proceed. + Merge command (used by all paths below): `make merge` --- @@ -320,4 +350,4 @@ If a single `gh issue create` call fails, report the failure for that finding an - `/submit-for-review` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - The follow-up issue offer in Step 9 runs only after a successful merge and only when the review produced non-blocking findings. Never prompt the user for follow-ups when the review blocked the merge — those findings should be fixed, not ticketed. - + diff --git a/.cursor/rules/submit-for-review.mdc b/.cursor/rules/submit-for-review.mdc index 8fa4491..05f2d96 100644 --- a/.cursor/rules/submit-for-review.mdc +++ b/.cursor/rules/submit-for-review.mdc @@ -33,7 +33,25 @@ If the current branch matches any of the above, **abort immediately** and say: ## Step 2 — Type-check gate -Run: +First, move to the repository root so the command resolves against the correct Makefile / project config: + +``` +cd "$(git rev-parse --show-toplevel)" +``` + +Then verify the make target exists before running it. Extract the target name from `make check` (e.g. `make check` → `check`) and run: + +``` +make -n 2>/dev/null +``` + +If `make -n` exits non-zero, **stop** and say: + +> "`make check` failed — the make target does not exist in the root Makefile. Add it and retry, or run `/setup` to reconfigure." + +Do not improvise a replacement command. Do not proceed. + +If the target exists, run: ``` make check ``` @@ -172,6 +190,18 @@ Wait for the review to complete and report its verdict. ## Step 8 — Act on verdict +Before merging, verify the merge target exists. Move to the repo root, extract the target name from `make merge` (e.g. `make merge` → `merge`), and run: + +``` +cd "$(git rev-parse --show-toplevel)" && make -n 2>/dev/null +``` + +If `make -n` exits non-zero, **stop** and say: + +> "`make merge` failed — the make target does not exist in the root Makefile. Add it and retry, or run `/setup` to reconfigure." + +Do not improvise a replacement command (e.g. do not fall back to `gh pr merge`). Do not proceed. + Merge command (used by all paths below): `make merge` --- @@ -326,4 +356,4 @@ If a single `gh issue create` call fails, report the failure for that finding an - `/submit-for-review` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - The follow-up issue offer in Step 9 runs only after a successful merge and only when the review produced non-blocking findings. Never prompt the user for follow-ups when the review blocked the merge — those findings should be fixed, not ticketed. - + diff --git a/.gemini/skills/submit-for-review/SKILL.md b/.gemini/skills/submit-for-review/SKILL.md index c2bab6e..9d72f64 100644 --- a/.gemini/skills/submit-for-review/SKILL.md +++ b/.gemini/skills/submit-for-review/SKILL.md @@ -32,7 +32,25 @@ If the current branch matches any of the above, **abort immediately** and say: ## Step 2 — Type-check gate -Run: +First, move to the repository root so the command resolves against the correct Makefile / project config: + +``` +cd "$(git rev-parse --show-toplevel)" +``` + +Then verify the make target exists before running it. Extract the target name from `make check` (e.g. `make check` → `check`) and run: + +``` +make -n 2>/dev/null +``` + +If `make -n` exits non-zero, **stop** and say: + +> "`make check` failed — the make target does not exist in the root Makefile. Add it and retry, or run `/setup` to reconfigure." + +Do not improvise a replacement command. Do not proceed. + +If the target exists, run: ``` make check ``` @@ -171,6 +189,18 @@ Wait for the review to complete and report its verdict. ## Step 8 — Act on verdict +Before merging, verify the merge target exists. Move to the repo root, extract the target name from `make merge` (e.g. `make merge` → `merge`), and run: + +``` +cd "$(git rev-parse --show-toplevel)" && make -n 2>/dev/null +``` + +If `make -n` exits non-zero, **stop** and say: + +> "`make merge` failed — the make target does not exist in the root Makefile. Add it and retry, or run `/setup` to reconfigure." + +Do not improvise a replacement command (e.g. do not fall back to `gh pr merge`). Do not proceed. + Merge command (used by all paths below): `make merge` --- @@ -325,4 +355,4 @@ If a single `gh issue create` call fails, report the failure for that finding an - `/submit-for-review` merges only to `dev` — never directly to `main`. - If `make merge` fails for any reason, report it and stop — do not attempt workarounds. - The follow-up issue offer in Step 9 runs only after a successful merge and only when the review produced non-blocking findings. Never prompt the user for follow-ups when the review blocked the merge — those findings should be fixed, not ticketed. - + diff --git a/skills/submit-for-review.md b/skills/submit-for-review.md index 5659c6c..91312ce 100644 --- a/skills/submit-for-review.md +++ b/skills/submit-for-review.md @@ -35,7 +35,25 @@ If the current branch matches any of the above, **abort immediately** and say: ## Step 2 — Type-check gate -Run: +First, move to the repository root so the command resolves against the correct Makefile / project config: + +``` +cd "$(git rev-parse --show-toplevel)" +``` + +Then verify the make target exists before running it. Extract the target name from `{{CHECK_CMD}}` (e.g. `make check` → `check`) and run: + +``` +make -n 2>/dev/null +``` + +If `make -n` exits non-zero, **stop** and say: + +> "`{{CHECK_CMD}}` failed — the make target does not exist in the root Makefile. Add it and retry, or run `/setup` to reconfigure." + +Do not improvise a replacement command. Do not proceed. + +If the target exists, run: ``` {{CHECK_CMD}} ``` @@ -190,6 +208,18 @@ Wait for the review to complete and report its verdict. ## Step 8 — Act on verdict +Before merging, verify the merge target exists. Move to the repo root, extract the target name from `{{MERGE_CMD}}` (e.g. `make merge` → `merge`), and run: + +``` +cd "$(git rev-parse --show-toplevel)" && make -n 2>/dev/null +``` + +If `make -n` exits non-zero, **stop** and say: + +> "`{{MERGE_CMD}}` failed — the make target does not exist in the root Makefile. Add it and retry, or run `/setup` to reconfigure." + +Do not improvise a replacement command (e.g. do not fall back to `gh pr merge`). Do not proceed. + {{#if BRANCH_DEV}} Merge command (used by all paths below): `{{MERGE_CMD}}` {{/if}}