Skip to content

Commit 3063fdc

Browse files
mvanhornclaude
andcommitted
fix(commands): align enabled-filtering semantics across all hook templates
tasks.md and implement.md previously said "Filter to only hooks where enabled: true", which would skip hooks that omit the enabled field. Updated to match specify.md/plan.md and HookExecutor's h.get('enabled', True) behavior: filter out only hooks where enabled is explicitly false. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3f1d357 commit 3063fdc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

templates/commands/implement.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You **MUST** consider the user input before proceeding (if not empty).
1919
- Check if `.specify/extensions.yml` exists in the project root.
2020
- If it exists, read it and look for entries under the `hooks.before_implement` key
2121
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
22-
- Filter to only hooks where `enabled: true`
22+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
2323
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
2424
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
2525
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
@@ -174,7 +174,7 @@ Note: This command assumes a complete task breakdown exists in tasks.md. If task
174174
10. **Check for extension hooks**: After completion validation, check if `.specify/extensions.yml` exists in the project root.
175175
- If it exists, read it and look for entries under the `hooks.after_implement` key
176176
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
177-
- Filter to only hooks where `enabled: true`
177+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
178178
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
179179
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
180180
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation

templates/commands/tasks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ You **MUST** consider the user input before proceeding (if not empty).
2828
- Check if `.specify/extensions.yml` exists in the project root.
2929
- If it exists, read it and look for entries under the `hooks.before_tasks` key
3030
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
31-
- Filter to only hooks where `enabled: true`
31+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
3232
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
3333
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
3434
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
@@ -100,7 +100,7 @@ You **MUST** consider the user input before proceeding (if not empty).
100100
6. **Check for extension hooks**: After tasks.md is generated, check if `.specify/extensions.yml` exists in the project root.
101101
- If it exists, read it and look for entries under the `hooks.after_tasks` key
102102
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
103-
- Filter to only hooks where `enabled: true`
103+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
104104
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
105105
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
106106
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation

0 commit comments

Comments
 (0)