You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(extensions): emit EXECUTE_COMMAND_INVOCATION in template hook examples
The dispatch-contract bullet tells the agent to self-dispatch using the
EXECUTE_COMMAND_INVOCATION line, but the mandatory-hook example blocks in
the templates (and the API-reference example) never emitted that line and
hardcoded `Executing: /{command}`. In skills-mode sessions /{command}
isn't a runnable form, so the instruction wasn't self-contained.
- All 9 templates (pre- and post-hook example blocks, 18 total): emit
`EXECUTE_COMMAND_INVOCATION: {invocation}` and use {invocation} for the
Executing line. Define {invocation} as the environment-correct command
form (usually /{command}; skills mode renders /skill:speckit-* or
$speckit-*) so the placeholder is self-explaining.
- EXTENSION-API-REFERENCE.md: mandatory-hook example now shows the
INVOCATION line and explains {invocation}.
- Test: count emitted EXECUTE_COMMAND_INVOCATION directive lines (indented,
inside the fence) and require one per EXECUTE_COMMAND block, so a prose
mention can't mask a missing line and templates can't regress to
emitting only EXECUTE_COMMAND.
Follow-up to #2730.
Copy file name to clipboardExpand all lines: templates/commands/analyze.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,12 +40,14 @@ You **MUST** consider the user input before proceeding (if not empty).
40
40
## Extension Hooks
41
41
42
42
**Automatic Pre-Hook**: {extension}
43
-
Executing: `/{command}`
43
+
Executing: `{invocation}`
44
44
EXECUTE_COMMAND: {command}
45
+
EXECUTE_COMMAND_INVOCATION: {invocation}
45
46
46
47
Wait for the result of the hook command before proceeding to the Goal.
47
48
```
48
-
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself, using the invocation shown on the `EXECUTE_COMMAND_INVOCATION:` line (which is the correct command form for this environment — skills mode may render it as `/skill:speckit-*` or `$speckit-*` rather than `/<command>`), and wait for its result before proceeding.
49
+
- Here `{invocation}` is the command form for the current environment: usually `/{command}`, but skills-mode sessions render it differently (e.g. `/skill:speckit-*` or `$speckit-*`). Use the same value for both the `Executing:` and `EXECUTE_COMMAND_INVOCATION:` lines.
50
+
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself using `{invocation}` (the value on the `EXECUTE_COMMAND_INVOCATION:` line) and wait for its result before proceeding.
49
51
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
50
52
51
53
## Goal
@@ -226,10 +228,12 @@ After reporting, check if `.specify/extensions.yml` exists in the project root.
226
228
## Extension Hooks
227
229
228
230
**Automatic Hook**: {extension}
229
-
Executing: `/{command}`
231
+
Executing: `{invocation}`
230
232
EXECUTE_COMMAND: {command}
233
+
EXECUTE_COMMAND_INVOCATION: {invocation}
231
234
```
232
-
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself, using the invocation shown on the `EXECUTE_COMMAND_INVOCATION:` line (which is the correct command form for this environment — skills mode may render it as `/skill:speckit-*` or `$speckit-*` rather than `/<command>`), and wait for its result before reporting completion.
235
+
- Here `{invocation}` is the command form for the current environment: usually `/{command}`, but skills-mode sessions render it differently (e.g. `/skill:speckit-*` or `$speckit-*`). Use the same value for both the `Executing:` and `EXECUTE_COMMAND_INVOCATION:` lines.
236
+
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself using `{invocation}` (the value on the `EXECUTE_COMMAND_INVOCATION:` line) and wait for its result before reporting completion.
233
237
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
Copy file name to clipboardExpand all lines: templates/commands/checklist.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,12 +61,14 @@ You **MUST** consider the user input before proceeding (if not empty).
61
61
## Extension Hooks
62
62
63
63
**Automatic Pre-Hook**: {extension}
64
-
Executing: `/{command}`
64
+
Executing: `{invocation}`
65
65
EXECUTE_COMMAND: {command}
66
+
EXECUTE_COMMAND_INVOCATION: {invocation}
66
67
67
68
Wait for the result of the hook command before proceeding to the Execution Steps.
68
69
```
69
-
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself, using the invocation shown on the `EXECUTE_COMMAND_INVOCATION:` line (which is the correct command form for this environment — skills mode may render it as `/skill:speckit-*` or `$speckit-*` rather than `/<command>`), and wait for its result before proceeding.
70
+
- Here `{invocation}` is the command form for the current environment: usually `/{command}`, but skills-mode sessions render it differently (e.g. `/skill:speckit-*` or `$speckit-*`). Use the same value for both the `Executing:` and `EXECUTE_COMMAND_INVOCATION:` lines.
71
+
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself using `{invocation}` (the value on the `EXECUTE_COMMAND_INVOCATION:` line) and wait for its result before proceeding.
70
72
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
71
73
72
74
## Execution Steps
@@ -361,8 +363,10 @@ Check if `.specify/extensions.yml` exists in the project root.
361
363
## Extension Hooks
362
364
363
365
**Automatic Hook**: {extension}
364
-
Executing: `/{command}`
366
+
Executing: `{invocation}`
365
367
EXECUTE_COMMAND: {command}
368
+
EXECUTE_COMMAND_INVOCATION: {invocation}
366
369
```
367
-
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself, using the invocation shown on the `EXECUTE_COMMAND_INVOCATION:` line (which is the correct command form for this environment — skills mode may render it as `/skill:speckit-*` or `$speckit-*` rather than `/<command>`), and wait for its result before reporting completion.
370
+
- Here `{invocation}` is the command form for the current environment: usually `/{command}`, but skills-mode sessions render it differently (e.g. `/skill:speckit-*` or `$speckit-*`). Use the same value for both the `Executing:` and `EXECUTE_COMMAND_INVOCATION:` lines.
371
+
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself using `{invocation}` (the value on the `EXECUTE_COMMAND_INVOCATION:` line) and wait for its result before reporting completion.
368
372
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
Copy file name to clipboardExpand all lines: templates/commands/clarify.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,12 +44,14 @@ You **MUST** consider the user input before proceeding (if not empty).
44
44
## Extension Hooks
45
45
46
46
**Automatic Pre-Hook**: {extension}
47
-
Executing: `/{command}`
47
+
Executing: `{invocation}`
48
48
EXECUTE_COMMAND: {command}
49
+
EXECUTE_COMMAND_INVOCATION: {invocation}
49
50
50
51
Wait for the result of the hook command before proceeding to the Outline.
51
52
```
52
-
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself, using the invocation shown on the `EXECUTE_COMMAND_INVOCATION:` line (which is the correct command form for this environment — skills mode may render it as `/skill:speckit-*` or `$speckit-*` rather than `/<command>`), and wait for its result before proceeding.
53
+
- Here `{invocation}` is the command form for the current environment: usually `/{command}`, but skills-mode sessions render it differently (e.g. `/skill:speckit-*` or `$speckit-*`). Use the same value for both the `Executing:` and `EXECUTE_COMMAND_INVOCATION:` lines.
54
+
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself using `{invocation}` (the value on the `EXECUTE_COMMAND_INVOCATION:` line) and wait for its result before proceeding.
53
55
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
54
56
55
57
## Outline
@@ -249,10 +251,12 @@ Check if `.specify/extensions.yml` exists in the project root.
249
251
## Extension Hooks
250
252
251
253
**Automatic Hook**: {extension}
252
-
Executing: `/{command}`
254
+
Executing: `{invocation}`
253
255
EXECUTE_COMMAND: {command}
256
+
EXECUTE_COMMAND_INVOCATION: {invocation}
254
257
```
255
-
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself, using the invocation shown on the `EXECUTE_COMMAND_INVOCATION:` line (which is the correct command form for this environment — skills mode may render it as `/skill:speckit-*` or `$speckit-*` rather than `/<command>`), and wait for its result before reporting completion.
258
+
- Here `{invocation}` is the command form for the current environment: usually `/{command}`, but skills-mode sessions render it differently (e.g. `/skill:speckit-*` or `$speckit-*`). Use the same value for both the `Executing:` and `EXECUTE_COMMAND_INVOCATION:` lines.
259
+
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself using `{invocation}` (the value on the `EXECUTE_COMMAND_INVOCATION:` line) and wait for its result before reporting completion.
Copy file name to clipboardExpand all lines: templates/commands/constitution.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,12 +41,14 @@ You **MUST** consider the user input before proceeding (if not empty).
41
41
## Extension Hooks
42
42
43
43
**Automatic Pre-Hook**: {extension}
44
-
Executing: `/{command}`
44
+
Executing: `{invocation}`
45
45
EXECUTE_COMMAND: {command}
46
+
EXECUTE_COMMAND_INVOCATION: {invocation}
46
47
47
48
Wait for the result of the hook command before proceeding to the Outline.
48
49
```
49
-
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself, using the invocation shown on the `EXECUTE_COMMAND_INVOCATION:` line (which is the correct command form for this environment — skills mode may render it as `/skill:speckit-*` or `$speckit-*` rather than `/<command>`), and wait for its result before proceeding.
50
+
- Here `{invocation}` is the command form for the current environment: usually `/{command}`, but skills-mode sessions render it differently (e.g. `/skill:speckit-*` or `$speckit-*`). Use the same value for both the `Executing:` and `EXECUTE_COMMAND_INVOCATION:` lines.
51
+
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself using `{invocation}` (the value on the `EXECUTE_COMMAND_INVOCATION:` line) and wait for its result before proceeding.
50
52
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
51
53
52
54
## Outline
@@ -145,8 +147,10 @@ Check if `.specify/extensions.yml` exists in the project root.
145
147
## Extension Hooks
146
148
147
149
**Automatic Hook**: {extension}
148
-
Executing: `/{command}`
150
+
Executing: `{invocation}`
149
151
EXECUTE_COMMAND: {command}
152
+
EXECUTE_COMMAND_INVOCATION: {invocation}
150
153
```
151
-
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself, using the invocation shown on the `EXECUTE_COMMAND_INVOCATION:` line (which is the correct command form for this environment — skills mode may render it as `/skill:speckit-*` or `$speckit-*` rather than `/<command>`), and wait for its result before reporting completion.
154
+
- Here `{invocation}` is the command form for the current environment: usually `/{command}`, but skills-mode sessions render it differently (e.g. `/skill:speckit-*` or `$speckit-*`). Use the same value for both the `Executing:` and `EXECUTE_COMMAND_INVOCATION:` lines.
155
+
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself using `{invocation}` (the value on the `EXECUTE_COMMAND_INVOCATION:` line) and wait for its result before reporting completion.
152
156
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
Copy file name to clipboardExpand all lines: templates/commands/implement.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,12 +40,14 @@ You **MUST** consider the user input before proceeding (if not empty).
40
40
## Extension Hooks
41
41
42
42
**Automatic Pre-Hook**: {extension}
43
-
Executing: `/{command}`
43
+
Executing: `{invocation}`
44
44
EXECUTE_COMMAND: {command}
45
+
EXECUTE_COMMAND_INVOCATION: {invocation}
45
46
46
47
Wait for the result of the hook command before proceeding to the Outline.
47
48
```
48
-
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself, using the invocation shown on the `EXECUTE_COMMAND_INVOCATION:` line (which is the correct command form for this environment — skills mode may render it as `/skill:speckit-*` or `$speckit-*` rather than `/<command>`), and wait for its result before proceeding.
49
+
- Here `{invocation}` is the command form for the current environment: usually `/{command}`, but skills-mode sessions render it differently (e.g. `/skill:speckit-*` or `$speckit-*`). Use the same value for both the `Executing:` and `EXECUTE_COMMAND_INVOCATION:` lines.
50
+
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself using `{invocation}` (the value on the `EXECUTE_COMMAND_INVOCATION:` line) and wait for its result before proceeding.
49
51
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
50
52
51
53
## Outline
@@ -190,10 +192,12 @@ Check if `.specify/extensions.yml` exists in the project root.
190
192
## Extension Hooks
191
193
192
194
**Automatic Hook**: {extension}
193
-
Executing: `/{command}`
195
+
Executing: `{invocation}`
194
196
EXECUTE_COMMAND: {command}
197
+
EXECUTE_COMMAND_INVOCATION: {invocation}
195
198
```
196
-
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself, using the invocation shown on the `EXECUTE_COMMAND_INVOCATION:` line (which is the correct command form for this environment — skills mode may render it as `/skill:speckit-*` or `$speckit-*` rather than `/<command>`), and wait for its result before reporting completion.
199
+
- Here `{invocation}` is the command form for the current environment: usually `/{command}`, but skills-mode sessions render it differently (e.g. `/skill:speckit-*` or `$speckit-*`). Use the same value for both the `Executing:` and `EXECUTE_COMMAND_INVOCATION:` lines.
200
+
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself using `{invocation}` (the value on the `EXECUTE_COMMAND_INVOCATION:` line) and wait for its result before reporting completion.
Copy file name to clipboardExpand all lines: templates/commands/plan.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,12 +48,14 @@ You **MUST** consider the user input before proceeding (if not empty).
48
48
## Extension Hooks
49
49
50
50
**Automatic Pre-Hook**: {extension}
51
-
Executing: `/{command}`
51
+
Executing: `{invocation}`
52
52
EXECUTE_COMMAND: {command}
53
+
EXECUTE_COMMAND_INVOCATION: {invocation}
53
54
54
55
Wait for the result of the hook command before proceeding to the Outline.
55
56
```
56
-
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself, using the invocation shown on the `EXECUTE_COMMAND_INVOCATION:` line (which is the correct command form for this environment — skills mode may render it as `/skill:speckit-*` or `$speckit-*` rather than `/<command>`), and wait for its result before proceeding.
57
+
- Here `{invocation}` is the command form for the current environment: usually `/{command}`, but skills-mode sessions render it differently (e.g. `/skill:speckit-*` or `$speckit-*`). Use the same value for both the `Executing:` and `EXECUTE_COMMAND_INVOCATION:` lines.
58
+
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself using `{invocation}` (the value on the `EXECUTE_COMMAND_INVOCATION:` line) and wait for its result before proceeding.
57
59
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
58
60
59
61
## Outline
@@ -89,10 +91,12 @@ Check if `.specify/extensions.yml` exists in the project root.
89
91
## Extension Hooks
90
92
91
93
**Automatic Hook**: {extension}
92
-
Executing: `/{command}`
94
+
Executing: `{invocation}`
93
95
EXECUTE_COMMAND: {command}
96
+
EXECUTE_COMMAND_INVOCATION: {invocation}
94
97
```
95
-
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself, using the invocation shown on the `EXECUTE_COMMAND_INVOCATION:` line (which is the correct command form for this environment — skills mode may render it as `/skill:speckit-*` or `$speckit-*` rather than `/<command>`), and wait for its result before reporting completion.
98
+
- Here `{invocation}` is the command form for the current environment: usually `/{command}`, but skills-mode sessions render it differently (e.g. `/skill:speckit-*` or `$speckit-*`). Use the same value for both the `Executing:` and `EXECUTE_COMMAND_INVOCATION:` lines.
99
+
- **Dispatch contract for mandatory hooks**: the `EXECUTE_COMMAND:` line is only a dispatch signal for CLI orchestrators that watch agent output — emitting it does not run anything. You MUST then invoke the hook yourself using `{invocation}` (the value on the `EXECUTE_COMMAND_INVOCATION:` line) and wait for its result before reporting completion.
0 commit comments