From 1423e92434b2ec17eb241e15e217db3c439b0fd0 Mon Sep 17 00:00:00 2001 From: Manfred Riem <15701806+mnriem@users.noreply.github.com> Date: Tue, 26 May 2026 16:00:53 -0500 Subject: [PATCH 1/3] fix: promote post-execution hook dispatch to H2 with directive language Restructure the after_* hook dispatch in all five core command templates (specify, clarify, implement, plan, tasks) to make hook execution structurally unmissable by LLMs during interactive slash-command flows. Changes applied consistently across all five templates: 1. Promote hook block from a final numbered step to a top-level '## Mandatory Post-Execution Hooks' H2, placed before the completion report. An H2 boundary is salient in a way that a numbered sub-step buried after 'Report completion' is not. 2. Use directive language for mandatory hooks: 'You MUST emit EXECUTE_COMMAND: for each mandatory hook' and 'You MUST complete this section before reporting completion to the user.' The previous conditional framing ('check if', 'based on its optional flag') buried the mandatory cases. 3. List mandatory hooks before optional hooks in the dispatch block, so the required action appears first. 4. Add a terminal '## Done When' verification checklist at the end of each template, including 'Extension hooks dispatched' as an explicit completion criterion. This gives the model a structured opportunity to verify completion before exiting. 5. Extract the completion report into its own '## Completion Report' H2 section, clearly separated from the hook dispatch. These changes preserve the interactive-vs-workflow distinction and do not introduce auto-run. They raise the reliability of the existing best-effort dispatch mechanism. Fixes #2688 --- templates/commands/clarify.md | 49 +++++++++++-------- templates/commands/implement.md | 72 ++++++++++++++++------------ templates/commands/plan.md | 72 ++++++++++++++++------------ templates/commands/specify.md | 80 ++++++++++++++++++------------- templates/commands/tasks.md | 84 +++++++++++++++++++-------------- 5 files changed, 208 insertions(+), 149 deletions(-) diff --git a/templates/commands/clarify.md b/templates/commands/clarify.md index 57cd01def1..0a09aee1a7 100644 --- a/templates/commands/clarify.md +++ b/templates/commands/clarify.md @@ -197,14 +197,6 @@ Execution steps: 7. Write the updated spec back to `FEATURE_SPEC`. -8. Report completion (after questioning loop ends or early termination): - - Number of questions asked & answered. - - Path to updated spec. - - Sections touched (list names). - - Coverage summary table listing each taxonomy category with Status: Resolved (was Partial/Missing and addressed), Deferred (exceeds question quota or better suited for planning), Clear (already sufficient), Outstanding (still Partial/Missing but low impact). - - If any Outstanding or Deferred remain, recommend whether to proceed to `__SPECKIT_COMMAND_PLAN__` or run `__SPECKIT_COMMAND_CLARIFY__` again later post-plan. - - Suggested next command. - Behavior rules: - If no meaningful ambiguities found (or all potential questions would be low-impact), respond: "No critical ambiguities detected worth formal clarification." and suggest proceeding. @@ -217,17 +209,27 @@ Behavior rules: Context for prioritization: {ARGS} -## Post-Execution Checks +## Mandatory Post-Execution Hooks + +**You MUST complete this section before reporting completion to the user.** -**Check for extension hooks (after clarification)**: Check if `.specify/extensions.yml` exists in the project root. -- If it exists, read it and look for entries under the `hooks.after_clarify` key -- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally +- If it does not exist, or no hooks are registered under `hooks.after_clarify`, skip to the Completion Report. +- If it exists, read it and look for entries under the `hooks.after_clarify` key. +- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue to the Completion Report. - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default. - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions: - If the hook has no `condition` field, or it is null/empty, treat the hook as executable - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation - For each executable hook, output the following based on its `optional` flag: + - **Mandatory hook** (`optional: false`) — **You MUST emit `EXECUTE_COMMAND:` for each mandatory hook**: + ``` + ## Extension Hooks + + **Automatic Hook**: {extension} + Executing: `/{command}` + EXECUTE_COMMAND: {command} + ``` - **Optional hook** (`optional: true`): ``` ## Extension Hooks @@ -239,12 +241,19 @@ Check if `.specify/extensions.yml` exists in the project root. Prompt: {prompt} To execute: `/{command}` ``` - - **Mandatory hook** (`optional: false`): - ``` - ## Extension Hooks - **Automatic Hook**: {extension} - Executing: `/{command}` - EXECUTE_COMMAND: {command} - ``` -- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently +## Completion Report + +Report completion (after questioning loop ends or early termination): +- Number of questions asked & answered. +- Path to updated spec. +- Sections touched (list names). +- Coverage summary table listing each taxonomy category with Status: Resolved (was Partial/Missing and addressed), Deferred (exceeds question quota or better suited for planning), Clear (already sufficient), Outstanding (still Partial/Missing but low impact). +- If any Outstanding or Deferred remain, recommend whether to proceed to `__SPECKIT_COMMAND_PLAN__` or run `__SPECKIT_COMMAND_CLARIFY__` again later post-plan. +- Suggested next command. + +## Done When + +- [ ] Spec ambiguities identified and clarifications integrated into spec file +- [ ] Extension hooks dispatched (if `.specify/extensions.yml` exists and has `after_clarify` hooks) +- [ ] Completion reported to user with questions answered, sections touched, and coverage summary diff --git a/templates/commands/implement.md b/templates/commands/implement.md index 52a042161f..aed90df386 100644 --- a/templates/commands/implement.md +++ b/templates/commands/implement.md @@ -168,35 +168,49 @@ You **MUST** consider the user input before proceeding (if not empty). - Check that implemented features match the original specification - Validate that tests pass and coverage meets requirements - Confirm the implementation follows the technical plan - - Report final status with summary of completed work Note: This command assumes a complete task breakdown exists in tasks.md. If tasks are incomplete or missing, suggest running `__SPECKIT_COMMAND_TASKS__` first to regenerate the task list. -10. **Check for extension hooks**: After completion validation, check if `.specify/extensions.yml` exists in the project root. - - If it exists, read it and look for entries under the `hooks.after_implement` key - - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally - - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default. - - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions: - - If the hook has no `condition` field, or it is null/empty, treat the hook as executable - - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation - - For each executable hook, output the following based on its `optional` flag: - - **Optional hook** (`optional: true`): - ``` - ## Extension Hooks - - **Optional Hook**: {extension} - Command: `/{command}` - Description: {description} - - Prompt: {prompt} - To execute: `/{command}` - ``` - - **Mandatory hook** (`optional: false`): - ``` - ## Extension Hooks - - **Automatic Hook**: {extension} - Executing: `/{command}` - EXECUTE_COMMAND: {command} - ``` - - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently +## Mandatory Post-Execution Hooks + +**You MUST complete this section before reporting completion to the user.** + +Check if `.specify/extensions.yml` exists in the project root. +- If it does not exist, or no hooks are registered under `hooks.after_implement`, skip to the Completion Report. +- If it exists, read it and look for entries under the `hooks.after_implement` key. +- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue to the Completion Report. +- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default. +- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions: + - If the hook has no `condition` field, or it is null/empty, treat the hook as executable + - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation +- For each executable hook, output the following based on its `optional` flag: + - **Mandatory hook** (`optional: false`) — **You MUST emit `EXECUTE_COMMAND:` for each mandatory hook**: + ``` + ## Extension Hooks + + **Automatic Hook**: {extension} + Executing: `/{command}` + EXECUTE_COMMAND: {command} + ``` + - **Optional hook** (`optional: true`): + ``` + ## Extension Hooks + + **Optional Hook**: {extension} + Command: `/{command}` + Description: {description} + + Prompt: {prompt} + To execute: `/{command}` + ``` + +## Completion Report + +Report final status with summary of completed work. + +## Done When + +- [ ] All tasks in tasks.md completed and marked `[X]` +- [ ] Implementation validated against specification, plan, and test coverage +- [ ] Extension hooks dispatched (if `.specify/extensions.yml` exists and has `after_implement` hooks) +- [ ] Completion reported to user with summary of completed work diff --git a/templates/commands/plan.md b/templates/commands/plan.md index 04db94ffaa..50a0504a9b 100644 --- a/templates/commands/plan.md +++ b/templates/commands/plan.md @@ -70,36 +70,48 @@ You **MUST** consider the user input before proceeding (if not empty). - Phase 1: Update agent context by running the agent script - Re-evaluate Constitution Check post-design -4. **Stop and report**: Command ends after Phase 2 planning. Report branch, IMPL_PLAN path, and generated artifacts. - -5. **Check for extension hooks**: After reporting, check if `.specify/extensions.yml` exists in the project root. - - If it exists, read it and look for entries under the `hooks.after_plan` key - - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally - - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default. - - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions: - - If the hook has no `condition` field, or it is null/empty, treat the hook as executable - - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation - - For each executable hook, output the following based on its `optional` flag: - - **Optional hook** (`optional: true`): - ``` - ## Extension Hooks - - **Optional Hook**: {extension} - Command: `/{command}` - Description: {description} - - Prompt: {prompt} - To execute: `/{command}` - ``` - - **Mandatory hook** (`optional: false`): - ``` - ## Extension Hooks - - **Automatic Hook**: {extension} - Executing: `/{command}` - EXECUTE_COMMAND: {command} - ``` - - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently +## Mandatory Post-Execution Hooks + +**You MUST complete this section before reporting completion to the user.** + +Check if `.specify/extensions.yml` exists in the project root. +- If it does not exist, or no hooks are registered under `hooks.after_plan`, skip to the Completion Report. +- If it exists, read it and look for entries under the `hooks.after_plan` key. +- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue to the Completion Report. +- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default. +- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions: + - If the hook has no `condition` field, or it is null/empty, treat the hook as executable + - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation +- For each executable hook, output the following based on its `optional` flag: + - **Mandatory hook** (`optional: false`) — **You MUST emit `EXECUTE_COMMAND:` for each mandatory hook**: + ``` + ## Extension Hooks + + **Automatic Hook**: {extension} + Executing: `/{command}` + EXECUTE_COMMAND: {command} + ``` + - **Optional hook** (`optional: true`): + ``` + ## Extension Hooks + + **Optional Hook**: {extension} + Command: `/{command}` + Description: {description} + + Prompt: {prompt} + To execute: `/{command}` + ``` + +## Completion Report + +Command ends after Phase 2 planning. Report branch, IMPL_PLAN path, and generated artifacts. + +## Done When + +- [ ] Plan workflow executed and design artifacts generated +- [ ] Extension hooks dispatched (if `.specify/extensions.yml` exists and has `after_plan` hooks) +- [ ] Completion reported to user with branch, plan path, and generated artifacts ## Phases diff --git a/templates/commands/specify.md b/templates/commands/specify.md index cafa32f4e2..9e62013f52 100644 --- a/templates/commands/specify.md +++ b/templates/commands/specify.md @@ -228,43 +228,55 @@ Given that feature description, do this: d. **Update Checklist**: After each validation iteration, update the checklist file with current pass/fail status -8. **Report completion** to the user with: - - `SPECIFY_FEATURE_DIRECTORY` — the feature directory path - - `SPEC_FILE` — the spec file path - - Checklist results summary - - Readiness for the next phase (`__SPECKIT_COMMAND_CLARIFY__` or `__SPECKIT_COMMAND_PLAN__`) - -9. **Check for extension hooks**: After reporting completion, check if `.specify/extensions.yml` exists in the project root. - - If it exists, read it and look for entries under the `hooks.after_specify` key - - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally - - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default. - - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions: - - If the hook has no `condition` field, or it is null/empty, treat the hook as executable - - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation - - For each executable hook, output the following based on its `optional` flag: - - **Optional hook** (`optional: true`): - ``` - ## Extension Hooks - - **Optional Hook**: {extension} - Command: `/{command}` - Description: {description} - - Prompt: {prompt} - To execute: `/{command}` - ``` - - **Mandatory hook** (`optional: false`): - ``` - ## Extension Hooks - - **Automatic Hook**: {extension} - Executing: `/{command}` - EXECUTE_COMMAND: {command} - ``` - - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently +## Mandatory Post-Execution Hooks + +**You MUST complete this section before reporting completion to the user.** + +Check if `.specify/extensions.yml` exists in the project root. +- If it does not exist, or no hooks are registered under `hooks.after_specify`, skip to the Completion Report. +- If it exists, read it and look for entries under the `hooks.after_specify` key. +- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue to the Completion Report. +- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default. +- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions: + - If the hook has no `condition` field, or it is null/empty, treat the hook as executable + - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation +- For each executable hook, output the following based on its `optional` flag: + - **Mandatory hook** (`optional: false`) — **You MUST emit `EXECUTE_COMMAND:` for each mandatory hook**: + ``` + ## Extension Hooks + + **Automatic Hook**: {extension} + Executing: `/{command}` + EXECUTE_COMMAND: {command} + ``` + - **Optional hook** (`optional: true`): + ``` + ## Extension Hooks + + **Optional Hook**: {extension} + Command: `/{command}` + Description: {description} + + Prompt: {prompt} + To execute: `/{command}` + ``` + +## Completion Report + +Report completion to the user with: +- `SPECIFY_FEATURE_DIRECTORY` — the feature directory path +- `SPEC_FILE` — the spec file path +- Checklist results summary +- Readiness for the next phase (`__SPECKIT_COMMAND_CLARIFY__` or `__SPECKIT_COMMAND_PLAN__`) **NOTE:** Branch creation is handled by the `before_specify` hook (git extension). Spec directory and file creation are always handled by this core command. +## Done When + +- [ ] Specification written to `SPEC_FILE` and validated against quality checklist +- [ ] Extension hooks dispatched (if `.specify/extensions.yml` exists and has `after_specify` hooks) +- [ ] Completion reported to user with feature directory, spec file path, and checklist results + ## Quick Guidelines - Focus on **WHAT** users need and **WHY**. diff --git a/templates/commands/tasks.md b/templates/commands/tasks.md index e5af6793b6..66be0d0847 100644 --- a/templates/commands/tasks.md +++ b/templates/commands/tasks.md @@ -89,42 +89,54 @@ You **MUST** consider the user input before proceeding (if not empty). - Parallel execution examples per story - Implementation strategy section (MVP first, incremental delivery) -5. **Report**: Output path to generated tasks.md and summary: - - Total task count - - Task count per user story - - Parallel opportunities identified - - Independent test criteria for each story - - Suggested MVP scope (typically just User Story 1) - - Format validation: Confirm ALL tasks follow the checklist format (checkbox, ID, labels, file paths) - -6. **Check for extension hooks**: After tasks.md is generated, check if `.specify/extensions.yml` exists in the project root. - - If it exists, read it and look for entries under the `hooks.after_tasks` key - - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally - - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default. - - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions: - - If the hook has no `condition` field, or it is null/empty, treat the hook as executable - - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation - - For each executable hook, output the following based on its `optional` flag: - - **Optional hook** (`optional: true`): - ``` - ## Extension Hooks - - **Optional Hook**: {extension} - Command: `/{command}` - Description: {description} - - Prompt: {prompt} - To execute: `/{command}` - ``` - - **Mandatory hook** (`optional: false`): - ``` - ## Extension Hooks - - **Automatic Hook**: {extension} - Executing: `/{command}` - EXECUTE_COMMAND: {command} - ``` - - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently +## Mandatory Post-Execution Hooks + +**You MUST complete this section before reporting completion to the user.** + +Check if `.specify/extensions.yml` exists in the project root. +- If it does not exist, or no hooks are registered under `hooks.after_tasks`, skip to the Completion Report. +- If it exists, read it and look for entries under the `hooks.after_tasks` key. +- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue to the Completion Report. +- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default. +- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions: + - If the hook has no `condition` field, or it is null/empty, treat the hook as executable + - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation +- For each executable hook, output the following based on its `optional` flag: + - **Mandatory hook** (`optional: false`) — **You MUST emit `EXECUTE_COMMAND:` for each mandatory hook**: + ``` + ## Extension Hooks + + **Automatic Hook**: {extension} + Executing: `/{command}` + EXECUTE_COMMAND: {command} + ``` + - **Optional hook** (`optional: true`): + ``` + ## Extension Hooks + + **Optional Hook**: {extension} + Command: `/{command}` + Description: {description} + + Prompt: {prompt} + To execute: `/{command}` + ``` + +## Completion Report + +Output path to generated tasks.md and summary: +- Total task count +- Task count per user story +- Parallel opportunities identified +- Independent test criteria for each story +- Suggested MVP scope (typically just User Story 1) +- Format validation: Confirm ALL tasks follow the checklist format (checkbox, ID, labels, file paths) + +## Done When + +- [ ] tasks.md generated with all phases, task IDs, and file paths +- [ ] Extension hooks dispatched (if `.specify/extensions.yml` exists and has `after_tasks` hooks) +- [ ] Completion reported to user with task count, story breakdown, and MVP scope Context for task generation: {ARGS} From 434e905fd56af7458b05dfa9390d0bf983f03ffc Mon Sep 17 00:00:00 2001 From: Manfred Riem <15701806+mnriem@users.noreply.github.com> Date: Tue, 26 May 2026 16:39:31 -0500 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20address=20review=20=E2=80=94=20narro?= =?UTF-8?q?w=20Done=20When=20wording=20and=20move=20to=20end=20of=20templa?= =?UTF-8?q?tes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Narrow the hooks checklist item from a broad condition to 'dispatched or skipped according to the rules in Mandatory Post-Execution Hooks above' so it does not contradict the filtering rules for disabled hooks or hooks with non-empty conditions. - Move the Done When section to the actual end of specify.md, plan.md, and tasks.md so it does not signal premature completion before the agent reads required guidance sections (Quick Guidelines, Phases/Key rules, Task Generation Rules). --- templates/commands/clarify.md | 2 +- templates/commands/implement.md | 2 +- templates/commands/plan.md | 12 ++++++------ templates/commands/specify.md | 12 ++++++------ templates/commands/tasks.md | 12 ++++++------ 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/templates/commands/clarify.md b/templates/commands/clarify.md index 0a09aee1a7..d4eb0048a8 100644 --- a/templates/commands/clarify.md +++ b/templates/commands/clarify.md @@ -255,5 +255,5 @@ Report completion (after questioning loop ends or early termination): ## Done When - [ ] Spec ambiguities identified and clarifications integrated into spec file -- [ ] Extension hooks dispatched (if `.specify/extensions.yml` exists and has `after_clarify` hooks) +- [ ] Extension hooks dispatched or skipped according to the rules in Mandatory Post-Execution Hooks above - [ ] Completion reported to user with questions answered, sections touched, and coverage summary diff --git a/templates/commands/implement.md b/templates/commands/implement.md index aed90df386..c416fa7387 100644 --- a/templates/commands/implement.md +++ b/templates/commands/implement.md @@ -212,5 +212,5 @@ Report final status with summary of completed work. - [ ] All tasks in tasks.md completed and marked `[X]` - [ ] Implementation validated against specification, plan, and test coverage -- [ ] Extension hooks dispatched (if `.specify/extensions.yml` exists and has `after_implement` hooks) +- [ ] Extension hooks dispatched or skipped according to the rules in Mandatory Post-Execution Hooks above - [ ] Completion reported to user with summary of completed work diff --git a/templates/commands/plan.md b/templates/commands/plan.md index 50a0504a9b..b44854f452 100644 --- a/templates/commands/plan.md +++ b/templates/commands/plan.md @@ -107,12 +107,6 @@ Check if `.specify/extensions.yml` exists in the project root. Command ends after Phase 2 planning. Report branch, IMPL_PLAN path, and generated artifacts. -## Done When - -- [ ] Plan workflow executed and design artifacts generated -- [ ] Extension hooks dispatched (if `.specify/extensions.yml` exists and has `after_plan` hooks) -- [ ] Completion reported to user with branch, plan path, and generated artifacts - ## Phases ### Phase 0: Outline & Research @@ -162,3 +156,9 @@ Command ends after Phase 2 planning. Report branch, IMPL_PLAN path, and generate - Use absolute paths for filesystem operations; use project-relative paths for references in documentation and agent context files - ERROR on gate failures or unresolved clarifications + +## Done When + +- [ ] Plan workflow executed and design artifacts generated +- [ ] Extension hooks dispatched or skipped according to the rules in Mandatory Post-Execution Hooks above +- [ ] Completion reported to user with branch, plan path, and generated artifacts diff --git a/templates/commands/specify.md b/templates/commands/specify.md index 9e62013f52..2d9fded02d 100644 --- a/templates/commands/specify.md +++ b/templates/commands/specify.md @@ -271,12 +271,6 @@ Report completion to the user with: **NOTE:** Branch creation is handled by the `before_specify` hook (git extension). Spec directory and file creation are always handled by this core command. -## Done When - -- [ ] Specification written to `SPEC_FILE` and validated against quality checklist -- [ ] Extension hooks dispatched (if `.specify/extensions.yml` exists and has `after_specify` hooks) -- [ ] Completion reported to user with feature directory, spec file path, and checklist results - ## Quick Guidelines - Focus on **WHAT** users need and **WHY**. @@ -337,3 +331,9 @@ Success criteria must be: - "Database can handle 1000 TPS" (implementation detail, use user-facing metric) - "React components render efficiently" (framework-specific) - "Redis cache hit rate above 80%" (technology-specific) + +## Done When + +- [ ] Specification written to `SPEC_FILE` and validated against quality checklist +- [ ] Extension hooks dispatched or skipped according to the rules in Mandatory Post-Execution Hooks above +- [ ] Completion reported to user with feature directory, spec file path, and checklist results diff --git a/templates/commands/tasks.md b/templates/commands/tasks.md index 66be0d0847..43ff37d760 100644 --- a/templates/commands/tasks.md +++ b/templates/commands/tasks.md @@ -132,12 +132,6 @@ Output path to generated tasks.md and summary: - Suggested MVP scope (typically just User Story 1) - Format validation: Confirm ALL tasks follow the checklist format (checkbox, ID, labels, file paths) -## Done When - -- [ ] tasks.md generated with all phases, task IDs, and file paths -- [ ] Extension hooks dispatched (if `.specify/extensions.yml` exists and has `after_tasks` hooks) -- [ ] Completion reported to user with task count, story breakdown, and MVP scope - Context for task generation: {ARGS} The tasks.md should be immediately executable - each task must be specific enough that an LLM can complete it without additional context. @@ -213,3 +207,9 @@ Every task MUST strictly follow this format: - Within each story: Tests (if requested) → Models → Services → Endpoints → Integration - Each phase should be a complete, independently testable increment - **Final Phase**: Polish & Cross-Cutting Concerns + +## Done When + +- [ ] tasks.md generated with all phases, task IDs, and file paths +- [ ] Extension hooks dispatched or skipped according to the rules in Mandatory Post-Execution Hooks above +- [ ] Completion reported to user with task count, story breakdown, and MVP scope From c8c47b54faf7f76e95c038f2d2854716017cad89 Mon Sep 17 00:00:00 2001 From: Manfred Riem <15701806+mnriem@users.noreply.github.com> Date: Tue, 26 May 2026 16:52:03 -0500 Subject: [PATCH 3/3] fix: update stale step 8 reference in specify.md validation flow The old 'proceed to step 8' pointed to the completion report step that was renumbered when hook dispatch was promoted to its own H2 section. Update the reference to point to 'Mandatory Post-Execution Hooks'. --- templates/commands/specify.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/commands/specify.md b/templates/commands/specify.md index 2d9fded02d..76c548676b 100644 --- a/templates/commands/specify.md +++ b/templates/commands/specify.md @@ -183,7 +183,7 @@ Given that feature description, do this: c. **Handle Validation Results**: - - **If all items pass**: Mark checklist complete and proceed to step 8 + - **If all items pass**: Mark checklist complete and proceed to the Mandatory Post-Execution Hooks section - **If items fail (excluding [NEEDS CLARIFICATION])**: 1. List the failing items and specific issues