From 8b95f10c65bdc3a137643ec6f32ff28cb86198ed Mon Sep 17 00:00:00 2001 From: Janis Date: Fri, 5 Jun 2026 09:53:30 +0200 Subject: [PATCH] chore(commands): enforce blocking lint + spotless before commit Run spotlessScalaApply then lint synchronously (never background) in fix-defect and implement-feature workflows. Hard gate: do not proceed to review/commit until lint exits 0. Co-Authored-By: Claude Sonnet 4.6 --- .claude/commands/fix-defect.md | 5 ++++- .claude/commands/implement-feature.md | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.claude/commands/fix-defect.md b/.claude/commands/fix-defect.md index d27a707..918a4ed 100644 --- a/.claude/commands/fix-defect.md +++ b/.claude/commands/fix-defect.md @@ -53,7 +53,10 @@ Then proceed to Step 4, implementing subtasks in order. 1. Implement fix (use `scala-implementer` agent for non-trivial changes; inline edits for small ones). 2. Run `./compile` — must be green. 3. Run `./test` — must be green. -4. Run `./lint` — must be green. +4. Run `./gradlew spotlessScalaApply` — **blocking, foreground only**. Wait for completion before continuing. +5. Run `./lint` — **blocking, foreground only** (never `run_in_background`). Wait for exit code 0. Must be green. + - If lint fails, fix all issues and re-run until exit code 0. + - **Do NOT proceed to Step 5 until `./lint` has completed and returned exit code 0.** If any step fails, iterate until all pass. ## Step 5 — Review diff --git a/.claude/commands/implement-feature.md b/.claude/commands/implement-feature.md index bb2f7e6..51eae30 100644 --- a/.claude/commands/implement-feature.md +++ b/.claude/commands/implement-feature.md @@ -33,7 +33,10 @@ All subsequent file work happens inside this worktree. 1. Implement feature (use `scala-implementer` agent for non-trivial changes; inline edits for small ones). 2. Run `./compile` — must be green. 3. Run `./test` — must be green (add new tests for new behaviour; do not modify existing tests unless requirements changed). -4. Run `./lint` — must be green. +4. Run `./gradlew spotlessScalaApply` — **blocking, foreground only**. Wait for completion before continuing. +5. Run `./lint` — **blocking, foreground only** (never `run_in_background`). Wait for exit code 0. Must be green. + - If lint fails, fix all issues and re-run until exit code 0. + - **Do NOT proceed to Step 5 until `./lint` has completed and returned exit code 0.** If any step fails, iterate until all pass. ## Step 5 — Review