Skip to content

Commit 3ecbc0f

Browse files
committed
chore: align preset commands to templates, add product clarify hooks
1 parent cb7ba8e commit 3ecbc0f

9 files changed

Lines changed: 441 additions & 1065 deletions

File tree

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ All notable changes to the Specify CLI and templates are documented here.
44

55
# [Unreleased]
66

7+
# [0.5.17] - 2026-04-24
8+
9+
### Changed
10+
11+
- **Aligned preset commands to templates**: All agentic-sdlc preset commands now aligned with template structure
12+
- plan.md: -118 lines, kept Triage Framework [SYNC]/[ASYNC]
13+
- analyze.md: -170 lines, kept Auto-Detection Pre/Post-Implementation
14+
- clarify.md: -141 lines, kept Mission Brief validation
15+
- checklist.md: -21 lines, kept Path Validation section
16+
- implement.md: -11 lines, kept Dual Execution Mode
17+
- specify.md: -73 lines, kept Mission Brief Enforcement
18+
19+
### Added
20+
21+
- **Product extension clarify hooks**: Added `before_clarify` and `after_clarify` hooks
22+
- Uses existing `adlc.product.link` command for PDR context loading
23+
- Aligns with architect extension pattern (plan hooks)
24+
725
### Fixed
826

927
- **team-ai-directives override**: `sync_team_ai_directives()` now auto-overrides existing installation

extensions/product/extension.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ hooks:
128128
after_specify:
129129
command: "adlc.product.validate"
130130
description: "Validate feature spec alignment with PRD (READ-ONLY)"
131+
before_clarify:
132+
command: "adlc.product.link"
133+
description: "Load PDR context for clarification"
134+
optional: true
135+
after_clarify:
136+
command: "adlc.product.validate"
137+
description: "Validate clarifications against PRD"
138+
optional: true
131139

132140
tags:
133141
- "product"

presets/agentic-sdlc/commands/adlc.spec.analyze.md

Lines changed: 81 additions & 307 deletions
Large diffs are not rendered by default.

presets/agentic-sdlc/commands/adlc.spec.checklist.md

Lines changed: 48 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ You **MUST** consider the user input before proceeding (if not empty).
7070
7171
## Execution Steps
7272
73-
1. **Setup**: Run `{SCRIPT}` from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS.
74-
- All file paths must be absolute.
75-
- For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
73+
1. **Setup**: Run `{SCRIPT}` from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS list.
74+
- All file paths must be absolute.
75+
- For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
7676
7777
### CRITICAL - Path Validation
7878
@@ -81,12 +81,6 @@ You **MUST** consider the user input before proceeding (if not empty).
8181
- Write checklist files ONLY to `./specs/<BRANCH>/checklists/` NOT root
8282
- Common mistake: Writing to `./checklists/` instead of `./specs/<BRANCH>/checklists/`
8383
84-
### Non-Git Repository Support
85-
86-
If working in a non-git repository:
87-
- Ensure `SPECIFY_FEATURE` environment variable is set
88-
- Run: `export SPECIFY_FEATURE=001-user-auth` before this command
89-
9084
2. **Clarify intent (dynamic)**: Derive up to THREE initial contextual clarifying questions (no pre-baked catalog). They MUST:
9185
- Be generated from the user's phrasing + extracted signals from spec/plan/tasks
9286
- Only ask about information that materially changes checklist content
@@ -126,16 +120,16 @@ If working in a non-git repository:
126120
- Infer any missing context from spec/plan/tasks (do NOT hallucinate)
127121
128122
4. **Load feature context**: Read from FEATURE_DIR:
129-
- spec.md: Feature requirements and scope
130-
- plan.md (if exists): Technical details, dependencies
131-
- tasks.md (if exists): Implementation tasks
132-
- {REPO_ROOT}/.specify/config/config.json: Current mode and enabled options (under `workflow` and `options` sections)
123+
- spec.md: Feature requirements and scope
124+
- plan.md (if exists): Technical details, dependencies
125+
- tasks.md (if exists): Implementation tasks
126+
- {REPO_ROOT}/.specify/config/config.json: Current mode and enabled options (under `workflow` and `options` sections)
133127
134-
**Context Loading Strategy**:
135-
- Load only necessary portions relevant to active focus areas (avoid full-file dumping)
136-
- Prefer summarizing long sections into concise scenario/requirement bullets
137-
- Use progressive disclosure: add follow-on retrieval only if gaps detected
138-
- If source docs are large, generate interim summary items instead of embedding raw text
128+
**Context Loading Strategy**:
129+
- Load only necessary portions relevant to active focus areas (avoid full-file dumping)
130+
- Prefer summarizing long sections into concise scenario/requirement bullets
131+
- Use progressive disclosure: add follow-on retrieval only if gaps detected
132+
- If source docs are large, generate interim summary items instead of embedding raw text
139133
140134
5. **Generate checklist** - Create "Unit Tests for Requirements":
141135
- Create `FEATURE_DIR/checklists/` directory if it doesn't exist
@@ -145,17 +139,28 @@ If working in a non-git repository:
145139
- File handling behavior:
146140
- If file does NOT exist: Create new file and number items starting from CHK001
147141
- If file exists: Append new items to existing file, continuing from the last CHK ID (e.g., if last item is CHK015, start new items at CHK016)
148-
- Never delete or replace existing checklist content - always preserve and append
142+
- Never delete or replace existing checklist content - always preserve and append
149143
150-
**CORE PRINCIPLE - Test the Requirements, Not the Implementation**:
144+
**CORE PRINCIPLE - Test the Requirements, Not the Implementation**:
151145
Every checklist item MUST evaluate the REQUIREMENTS THEMSELVES for:
152146
- **Completeness**: Are all necessary requirements present?
153147
- **Clarity**: Are requirements unambiguous and specific?
154148
- **Consistency**: Do requirements align with each other?
155149
- **Measurability**: Can requirements be objectively verified?
156150
- **Coverage**: Are all scenarios/edge cases addressed?
157151
158-
**HOW TO WRITE CHECKLIST ITEMS - "Unit Tests for English"**:
152+
**Category Structure** - Group items by requirement quality dimensions:
153+
- **Requirement Completeness** (Are all necessary requirements documented?)
154+
- **Requirement Clarity** (Are requirements specific and unambiguous?)
155+
- **Requirement Consistency** (Do requirements align without conflicts?)
156+
- **Acceptance Criteria Quality** (Are success criteria measurable?)
157+
- **Scenario Coverage** (Are all flows/cases addressed?)
158+
- **Edge Case Coverage** (Are boundary conditions defined?)
159+
- **Non-Functional Requirements** (Performance, Security, Accessibility, etc. - are they specified?)
160+
- **Dependencies & Assumptions** (Are they documented and validated?)
161+
- **Ambiguities & Conflicts** (What needs clarification?)
162+
163+
**HOW TO WRITE CHECKLIST ITEMS - "Unit Tests for English"**:
159164
160165
❌ **WRONG** (Testing implementation):
161166
- "Verify landing page displays 3 episode cards"
@@ -177,7 +182,7 @@ If working in a non-git repository:
177182
- Focus on what's WRITTEN (or not written) in the spec/plan
178183
- Include quality dimension in brackets [Completeness/Clarity/Consistency/etc.]
179184
- Reference spec section `[Spec §X.Y]` when checking existing requirements
180-
- Use `[Gap]` marker when checking for missing requirements
185+
- Use `[Gap]` marker when checking for missing requirements
181186
182187
**EXAMPLES BY QUALITY DIMENSION**:
183188
@@ -200,56 +205,33 @@ If working in a non-git repository:
200205
- "Are concurrent user interaction scenarios addressed? [Coverage, Gap]"
201206
- "Are requirements specified for partial data loading failures? [Coverage, Exception Flow]"
202207
203-
Measurability:
204-
- "Are visual hierarchy requirements measurable/testable? [Acceptance Criteria, Spec §FR-1]"
205-
- "Can 'balanced visual weight' be objectively verified? [Measurability, Spec §FR-2]"
206-
207-
Completeness:
208-
- "Are error handling requirements defined for all API failure modes? [Gap]"
209-
- "Are accessibility requirements specified for all interactive elements? [Completeness]"
210-
- "Are mobile breakpoint requirements defined for responsive layouts? [Gap]"
211-
212-
Clarity:
213-
- "Is 'fast loading' quantified with specific timing thresholds? [Clarity, Spec §NFR-2]"
214-
- "Are 'related episodes' selection criteria explicitly defined? [Clarity, Spec §FR-5]"
215-
- "Is 'prominent' defined with measurable visual properties? [Ambiguity, Spec §FR-4]"
208+
Measurability:
209+
- "Are visual hierarchy requirements measurable/testable? [Acceptance Criteria, Spec §FR-1]"
210+
- "Can 'balanced visual weight' be objectively verified? [Measurability, Spec §FR-2]"
216211
217-
Consistency:
218-
- "Do navigation requirements align across all pages? [Consistency, Spec §FR-10]"
219-
- "Are card component requirements consistent between landing and detail pages? [Consistency]"
220-
221-
Coverage:
222-
- "Are requirements defined for zero-state scenarios (no episodes)? [Coverage, Edge Case]"
223-
- "Are concurrent user interaction scenarios addressed? [Coverage, Gap]"
224-
- "Are requirements specified for partial data loading failures? [Coverage, Exception Flow]"
225-
226-
Measurability:
227-
- "Are visual hierarchy requirements measurable/testable? [Acceptance Criteria, Spec §FR-1]"
228-
- "Can 'balanced visual weight' be objectively verified? [Measurability, Spec §FR-2]"
229-
230-
**Scenario Classification & Coverage** (Requirements Quality Focus):
231-
- Check if requirements exist for: Primary, Alternate, Exception/Error, Recovery, Non-Functional scenarios
232-
- For each scenario class, ask: "Are [scenario type] requirements complete, clear, and consistent?"
233-
- If scenario class missing: "Are [scenario type] requirements intentionally excluded or missing? [Gap]"
234-
- Include resilience/rollback when state mutation occurs: "Are rollback requirements defined for migration failures? [Gap]"
212+
**Scenario Classification & Coverage** (Requirements Quality Focus):
213+
- Check if requirements exist for: Primary, Alternate, Exception/Error, Recovery, Non-Functional scenarios
214+
- For each scenario class, ask: "Are [scenario type] requirements complete, clear, and consistent?"
215+
- If scenario class missing: "Are [scenario type] requirements intentionally excluded or missing? [Gap]"
216+
- Include resilience/rollback when state mutation occurs: "Are rollback requirements defined for migration failures? [Gap]"
235217
236218
**Traceability Requirements**:
237219
- MINIMUM: ≥80% of items MUST include at least one traceability reference
238220
- Each item should reference: spec section `[Spec §X.Y]`, or use markers: `[Gap]`, `[Ambiguity]`, `[Conflict]`, `[Assumption]`
239221
- If no ID system exists: "Is a requirement & acceptance criteria ID scheme established? [Traceability]"
240222
241-
**Surface & Resolve Issues** (Requirements Quality Problems):
242-
Ask questions about the requirements themselves:
243-
- Ambiguities: "Is the term 'fast' quantified with specific metrics? [Ambiguity, Spec §NFR-1]"
244-
- Conflicts: "Do navigation requirements conflict between §FR-10 and §FR-10a? [Conflict]"
245-
- Assumptions: "Is the assumption of 'always available podcast API' validated? [Assumption]"
246-
- Dependencies: "Are external podcast API requirements documented? [Dependency, Gap]"
247-
- Missing definitions: "Is 'visual hierarchy' defined with measurable criteria? [Gap]"
223+
**Surface & Resolve Issues** (Requirements Quality Problems):
224+
Ask questions about the requirements themselves:
225+
- Ambiguities: "Is the term 'fast' quantified with specific metrics? [Ambiguity, Spec §NFR-1]"
226+
- Conflicts: "Do navigation requirements conflict between §FR-10 and §FR-10a? [Conflict]"
227+
- Assumptions: "Is the assumption of 'always available podcast API' validated? [Assumption]"
228+
- Dependencies: "Are external podcast API requirements documented? [Dependency, Gap]"
229+
- Missing definitions: "Is 'visual hierarchy' defined with measurable criteria? [Gap]"
248230
249-
**Content Consolidation**:
250-
- Soft cap: If raw candidate items > 40, prioritize by risk/impact
251-
- Merge near-duplicates checking the same requirement aspect
252-
- If >5 low-impact edge cases, create one item: "Are edge cases X, Y, Z addressed in requirements? [Coverage]"
231+
**Content Consolidation**:
232+
- Soft cap: If raw candidate items > 40, prioritize by risk/impact
233+
- Merge near-duplicates checking the same requirement aspect
234+
- If >5 low-impact edge cases, create one item: "Are edge cases X, Y, Z addressed in requirements? [Coverage]"
253235
254236
**🚫 ABSOLUTELY PROHIBITED** - These make it an implementation test, not a requirements test:
255237
- ❌ Any item starting with "Verify", "Test", "Confirm", "Check" + implementation behavior
@@ -267,15 +249,13 @@ If working in a non-git repository:
267249
- ✅ "Are [edge cases/scenarios] addressed in requirements?"
268250
- ✅ "Does the spec define [missing aspect]?"
269251
270-
7. **Structure Reference**: Generate the checklist following the canonical template in `templates/checklist-template.md` for title, meta section, category headings, and ID formatting. If template is unavailable, use: H1 title, purpose/created meta lines, `##` category sections containing `- [ ] CHK### <requirement item>` lines with globally incrementing IDs starting at CHK001.
252+
6. **Structure Reference**: Generate the checklist following the canonical template in `templates/checklist-template.md` for title, meta section, category headings, and ID formatting. If template is unavailable, use: H1 title, purpose/created meta lines, `##` category sections containing `- [ ] CHK### <requirement item>` lines with globally incrementing IDs starting at CHK001.
271253
272254
7. **Report**: Output full path to checklist file, item count, and summarize whether the run created a new file or appended to an existing one. Summarize:
273255
- Focus areas selected
274256
- Depth level
275257
- Actor/timing
276258
- Any explicit user-specified must-have items incorporated
277-
- MCP configuration validation status (if included in checklist)
278-
- Framework options validation status (based on enabled mode options)
279259
280260
**Important**: Each `/spec.checklist` command invocation uses a short, descriptive checklist filename and either creates a new file or appends to an existing one. This allows:
281261
@@ -389,4 +369,4 @@ Check if `.specify/extensions.yml` exists in the project root.
389369
Executing: `/{command}`
390370
EXECUTE_COMMAND: {command}
391371
```
392-
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
372+
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently

0 commit comments

Comments
 (0)