Skip to content

submit-for-review: CHECK_CMD runs in agent CWD instead of repo root #129

Description

@sebastientaggart

Problem

Step 2 (Type-check gate) runs {{CHECK_CMD}} without first cd-ing to the repository root. If the agent's working directory has drifted into a subdirectory (e.g. backend/), the command fails because the subdirectory's Makefile doesn't have the expected target.

The agent then improvises a fallback (e.g. make lint && make format-check), which only partially checks the project and silently skips other components (e.g. frontend type-check). This defeats the purpose of the gate.

Affected file

skills/submit-for-review/SKILL.md, Step 2 (~line 32)

Current

make check

Suggested fix

Wrap the command so it always runs from the repo root:

cd "$(git rev-parse --show-toplevel)" && make check

This applies to the template source — synced adapters (.claude/commands/, .cursor/rules/, etc.) will pick it up on next sync.sh run.

Impact

Any consumer project where CHECK_CMD is defined in the root Makefile (the common case) is affected if the agent happens to be in a subdirectory when /submit-for-review is invoked.

Metadata

Metadata

Labels

qa-passedQA completed, passes

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions