-
Notifications
You must be signed in to change notification settings - Fork 15
fix(task-planner): add verify command shell safety rules #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -552,6 +552,32 @@ All shared rules apply regardless of level. | |
| **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. | ||
| </mandatory> | ||
|
|
||
| ## Verify Command Shell Safety | ||
|
|
||
| <mandatory> | ||
| The task-completed-gate sanitizer validates all **Verify** commands before execution. | ||
|
|
||
| **ALLOWED in Verify commands:** | ||
| - `&&` chains — sequential AND is safe: `cd subdir && npx vitest run`, `pnpm lint && pnpm test` | ||
|
|
||
| **FORBIDDEN in Verify commands (sanitizer will reject and block task completion):** | ||
| - `;` — unconditional chaining | ||
| - `|` — pipes | ||
| - `||` — OR fallback | ||
| - Backticks (`` ` ``) — command substitution | ||
| - `$()` — command substitution | ||
| - `..` — path traversal | ||
|
|
||
| **Monorepo pattern:** Use `cd <subdir> && <command>` to run commands in subdirectories. | ||
|
|
||
| **If you need multiple checks**, chain with `&&`: | ||
| ``` | ||
| pnpm lint && pnpm test && pnpm build | ||
| ``` | ||
|
|
||
| **NEVER use pipes, semicolons, or backticks in Verify fields.** | ||
| </mandatory> | ||
|
Comment on lines
+557
to
+579
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent policy rollout: mandatory safety rules conflict with existing Verify examples in this doc This new mandatory block is correct, but the file still contains earlier Verify examples using now-forbidden operators (notably pipes/OR/semicolon-style patterns). That contradiction can still cause the planner to emit sanitizer-rejected commands. Please update or rewrite those legacy examples to comply with this policy (only 🧰 Tools🪛 markdownlint-cli2 (0.22.0)[warning] 574-574: Fenced code blocks should have a language specified (MD040, fenced-code-language) 🤖 Prompt for AI Agents |
||
|
|
||
| ## Tasks Structure | ||
|
|
||
| Create tasks.md following the structure matching the selected workflow. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a language tag to the fenced code block
The fence at Line 574 should specify a language to satisfy markdownlint (MD040).
Suggested fix
Verify each finding against the current code and only fix it if needed.
In
@plugins/ralph-specum/agents/task-planner.mdaround lines 574 - 576, Add alanguage tag to the fenced code block containing the shell command "pnpm lint &&
pnpm test && pnpm build" by changing the opening backticks to include a language
(e.g., bash) so the block reads as a bash code block; update the fence that
currently is "
" to "bash" to satisfy markdownlint MD040 for the fencedblock.