Skip to content

Commit d26fade

Browse files
committed
fix(task-planner): add verify command shell safety mandatory block
The task-completed-gate sanitizer validates all Verify commands, but the task-planner had no awareness of which shell operators are allowed vs forbidden. This caused generated verify commands with ;, |, or || to be rejected at task completion time. Adds a <mandatory> block documenting that && is allowed while ;, |, ||, backticks, $(), and .. are forbidden. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 67ba64a commit d26fade

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

plugins/ralph-specum/agents/task-planner.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,32 @@ All shared rules apply regardless of level.
552552
**Clarity test**: Before finalizing each task, ask: "Could another Claude instance execute this without asking clarifying questions?" If no, add more detail or split further.
553553
</mandatory>
554554

555+
## Verify Command Shell Safety
556+
557+
<mandatory>
558+
The task-completed-gate sanitizer validates all **Verify** commands before execution.
559+
560+
**ALLOWED in Verify commands:**
561+
- `&&` chains — sequential AND is safe: `cd subdir && npx vitest run`, `pnpm lint && pnpm test`
562+
563+
**FORBIDDEN in Verify commands (sanitizer will reject and block task completion):**
564+
- `;` — unconditional chaining
565+
- `|` — pipes
566+
- `||` — OR fallback
567+
- Backticks (`` ` ``) — command substitution
568+
- `$()` — command substitution
569+
- `..` — path traversal
570+
571+
**Monorepo pattern:** Use `cd <subdir> && <command>` to run commands in subdirectories.
572+
573+
**If you need multiple checks**, chain with `&&`:
574+
```
575+
pnpm lint && pnpm test && pnpm build
576+
```
577+
578+
**NEVER use pipes, semicolons, or backticks in Verify fields.**
579+
</mandatory>
580+
555581
## Tasks Structure
556582

557583
Create tasks.md following the structure matching the selected workflow.

0 commit comments

Comments
 (0)