Skip to content

Commit cc2d6d0

Browse files
JonyanDunhclaude
andauthored
chore(commands): modernize slash command frontmatter (v1.2.3) (#12)
Update all three slash command .md files (start, stop, help) to use only documented frontmatter fields from the canonical Claude Code reference at https://code.claude.com/docs/en/skills.md#frontmatter-reference. ## What changed - Removed `hide-from-slash-command-tool` from start.md and stop.md. This field is NOT documented in the official Claude Code reference. It was inherited from the upstream ralph-loop plugin where it appears as a legacy / undocumented convention — Claude Code silently ignores unknown fields, so removing it has no behavioral downside. Confirmed absent from: - https://code.claude.com/docs/en/skills.md - https://code.claude.com/docs/en/plugins-reference.md - https://code.claude.com/docs/en/commands.md - Added `disable-model-invocation: true` to all three commands. This IS the documented way to block programmatic invocation of a slash command by the agent — ensures /watchdog:start, /watchdog:stop, and /watchdog:help can only be triggered by the user typing them directly, never by the agent auto-invoking them via the Skill tool. - Added explicit `argument-hint` to stop.md and help.md (empty string for no-args commands, so autocomplete shows the command takes no arguments). start.md already had `argument-hint` from earlier, tightened to "\"<PROMPT>\" [--max-iterations N]" which hints at the required double quotes around the prompt. ## Threat model clarification Even without any "hide from agent" mechanism, the watchdog plugin is robust against a *confused or lazy* agent — which is the realistic threat model for a self-referential loop: - `disable-model-invocation: true` means the agent cannot call /watchdog:stop programmatically even if it wanted to - The classifier subprocess lives in a separate claude process the agent has no handle on - The Stop hook fires regardless of any output the agent produces; the agent cannot suppress or spoof it - Even if the agent deletes `.claude/watchdog.claudepid.*.local.json` to break the loop, that action shows up in the session transcript and is visible to the user — a self-owning "win" Watchdog is not designed to survive an *adversarial* agent that is deliberately trying to escape a sandbox; it is designed to keep a task-following agent honest about whether it has actually done the work. ## No code changes All changes are confined to the three .md files under `commands/`. Zero changes to lib/, hooks/, scripts/, or tests. The 80-test suite still passes unchanged (78 active + 2 skipped-inside-Claude-Code, 0 failures). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d994f47 commit cc2d6d0

5 files changed

Lines changed: 9 additions & 6 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"name": "watchdog",
1212
"description": "Self-referential loop for Claude Code that re-feeds the user's prompt until the task truly stops producing file edits. Uses a headless Haiku classifier to judge convergence, requires the agent to actually call tools before exit (no pure-text 'done' claims), and is hidden from the agent so it cannot cheat. Apache 2.0, derived from ralph-loop.",
13-
"version": "1.2.2",
13+
"version": "1.2.3",
1414
"author": {
1515
"name": "Jonyan Dunh",
1616
"email": "jonyandunh@outlook.com"
@@ -30,5 +30,5 @@
3030
]
3131
}
3232
],
33-
"version": "1.2.2"
33+
"version": "1.2.3"
3434
}

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "watchdog",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "Self-referential loop for Claude Code. Re-feeds the same prompt after every turn until files actually stop changing.",
55
"author": {
66
"name": "Jonyan Dunh",

commands/help.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
description: "Explain Watchdog plugin and available commands"
3+
argument-hint: ""
4+
disable-model-invocation: true
35
---
46

57
# Watchdog Plugin Help

commands/start.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
description: "Start Watchdog in current session"
3-
argument-hint: "PROMPT [--max-iterations N]"
3+
argument-hint: "\"<PROMPT>\" [--max-iterations N]"
44
allowed-tools: ["Bash(node:*)"]
5-
hide-from-slash-command-tool: "true"
5+
disable-model-invocation: true
66
---
77

88
```!

commands/stop.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
description: "Cancel active Watchdog"
3+
argument-hint: ""
34
allowed-tools: ["Bash(node:*)"]
4-
hide-from-slash-command-tool: "true"
5+
disable-model-invocation: true
56
---
67

78
```!

0 commit comments

Comments
 (0)