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
Rewrote all 9 command templates from scratch based on v0.8.1 upstream
content, applying the fork's terse philosophy:
- Collapsed the ~60-line hook-checking boilerplate duplicated in every
file down to one line ("Run hooks.before_X from .specify/extensions.yml
if present"). This alone saved ~500 lines across the 9 files.
- Cut long example lists (implement.md's per-technology ignore-file
enumerations, specify.md's "For AI Generation" prose, good/bad
example tables) to 2-3 representative cases.
- Removed philosophy prose that restated what the step-by-step already
said.
- Added explicit output line limits to constrain generated artifacts:
spec.md β€50 lines, plan.md β€60 lines.
- Preserved all v0.8.1 new features: __SPECKIT_COMMAND_X__ template
markers (for install-time substitution), .specify/feature.json
persistence, branch_numbering sequential/timestamp mode, extension
hook points, checklist gate in implement, scripts frontmatter with
sh/ps variants.
Per-file:
specify 327 β 74
plan 152 β 59
tasks 203 β 84
implement 201 β 65
analyze 252 β 95
checklist 364 β 54
clarify 250 β 94
constitution 150 β 76
taskstoissues 99 β 41
Data templates (templates/*.md) left untouched for now; the command-
level line-limit instructions constrain output at generation time even
if the templates retain their example sections. If still too verbose
in practice, data-template trimming can follow in a separate PR.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
You **MUST** consider the user input before proceeding (if not empty).
15
15
16
-
## Pre-Execution Checks
16
+
## Pre-Execution
17
17
18
-
**Check for extension hooks (before analysis)**:
19
-
- Check if `.specify/extensions.yml` exists in the project root.
20
-
- If it exists, read it and look for entries under the `hooks.before_analyze` key
21
-
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
22
-
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
23
-
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
24
-
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
25
-
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
26
-
- For each executable hook, output the following based on its `optional` flag:
27
-
-**Optional hook** (`optional: true`):
28
-
```
29
-
## Extension Hooks
18
+
Run `hooks.before_analyze` from `.specify/extensions.yml` if present.
30
19
31
-
**Optional Pre-Hook**: {extension}
32
-
Command: `/{command}`
33
-
Description: {description}
20
+
## Constraints
34
21
35
-
Prompt: {prompt}
36
-
To execute: `/{command}`
37
-
```
38
-
- **Mandatory hook** (`optional: false`):
39
-
```
40
-
## Extension Hooks
22
+
**READ-ONLY.** Do not modify any files. Output a single analysis report.
41
23
42
-
**Automatic Pre-Hook**: {extension}
43
-
Executing: `/{command}`
44
-
EXECUTE_COMMAND: {command}
24
+
**Constitution is authoritative.** Conflicts with `/memory/constitution.md` β always CRITICAL. Principles change only via `__SPECKIT_COMMAND_CONSTITUTION__`.
45
25
46
-
Wait for the result of the hook command before proceeding to the Goal.
47
-
```
48
-
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
26
+
## Steps
49
27
50
-
## Goal
28
+
1.**Setup**: run `{SCRIPT}`. Parse `FEATURE_DIR` + `AVAILABLE_DOCS`. Derive absolute paths:
29
+
-`SPEC = FEATURE_DIR/spec.md`
30
+
-`PLAN = FEATURE_DIR/plan.md`
31
+
-`TASKS = FEATURE_DIR/tasks.md`
51
32
52
-
Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (`spec.md`, `plan.md`, `tasks.md`) before implementation. This command MUST run only after `__SPECKIT_COMMAND_TASKS__` has successfully produced a complete `tasks.md`.
**STRICTLY READ-ONLY**: Do **not** modify any files. Output a structured analysis report. Offer an optional remediation plan (user must explicitly approve before any follow-up editing commands would be invoked manually).
41
+
3.**Build internal models** (don't emit):
42
+
- Requirements inventory: FR-###, SC-### as keys (skip non-buildable outcomes like "reduce tickets by 50%")
43
+
- User-action inventory with acceptance criteria
44
+
- Task β requirement mapping
45
+
- Constitution MUST/SHOULD statements
57
46
58
-
**Constitution Authority**: The project constitution (`/memory/constitution.md`) is **non-negotiable** within this analysis scope. Constitution conflicts are automatically CRITICAL and require adjustment of the spec, plan, or tasksβnot dilution, reinterpretation, or silent ignoring of the principle. If a principle itself needs to change, that must occur in a separate, explicit constitution update outside `__SPECKIT_COMMAND_ANALYZE__`.
-**A. Duplication** β near-duplicate requirements; flag worse phrasing
49
+
-**B. Ambiguity** β vague adjectives ("fast", "robust") without metrics; TODO/TKTK/`<placeholder>`
50
+
-**C. Underspecification** β verbs with no object; stories missing acceptance; tasks referencing undefined components
51
+
-**D. Constitution alignment** β any conflict with MUST principle; missing mandated sections
52
+
-**E. Coverage gaps** β requirements with 0 tasks; tasks with no mapped requirement; buildable SCs not reflected in tasks
53
+
-**F. Inconsistency** β terminology drift; entity mentioned in plan but not spec (or vice versa); task ordering contradictions; conflicting choices (Next.js vs Vue)
Stable IDs prefixed by category initial (`D1`, `A2`, β¦).
78
79
79
-
- Overview/Context
80
-
- Functional Requirements
81
-
- Success Criteria (measurable outcomes β e.g., performance, security, availability, user success, business impact)
82
-
- User Stories
83
-
- Edge Cases (if present)
80
+
7.**Next actions**:
81
+
- CRITICAL present β recommend resolving before `__SPECKIT_COMMAND_IMPLEMENT__`
82
+
- Only LOW/MEDIUM β may proceed; list improvement suggestions
83
+
- Suggest specific follow-up commands
84
84
85
-
**From plan.md:**
85
+
8.**Offer remediation**: ask "Suggest concrete edits for top N?" β never apply automatically.
86
86
87
-
- Architecture/stack choices
88
-
- Data Model references
89
-
- Phases
90
-
- Technical constraints
87
+
9. Run `hooks.after_analyze` if present.
91
88
92
-
**From tasks.md:**
89
+
## Principles
93
90
94
-
- Task IDs
95
-
- Descriptions
96
-
- Phase grouping
97
-
- Parallel markers [P]
98
-
- Referenced file paths
99
-
100
-
**From constitution:**
101
-
102
-
- Load `/memory/constitution.md` for principle validation
103
-
104
-
### 3. Build Semantic Models
105
-
106
-
Create internal representations (do not include raw artifacts in output):
107
-
108
-
- **Requirements inventory**: For each Functional Requirement (FR-###) and Success Criterion (SC-###), record a stable key. Use the explicit FR-/SC- identifier as the primary key when present, and optionally also derive an imperative-phrase slug for readability (e.g., "User can upload file" β `user-can-upload-file`). Include only Success Criteria items that require buildable work (e.g., load-testing infrastructure, security audit tooling), and exclude post-launch outcome metrics and business KPIs (e.g., "Reduce support tickets by 50%").
109
-
- **User story/action inventory**: Discrete user actions with acceptance criteria
110
-
- **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
At end of report, output a concise Next Actions block:
193
-
194
-
- If CRITICAL issues exist: Recommend resolving before `__SPECKIT_COMMAND_IMPLEMENT__`
195
-
- If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
196
-
- Provide explicit command suggestions: e.g., "Run __SPECKIT_COMMAND_SPECIFY__ with refinement", "Run __SPECKIT_COMMAND_PLAN__ to adjust architecture", "Manually edit tasks.md to add coverage for 'performance-metrics'"
197
-
198
-
### 8. Offer Remediation
199
-
200
-
Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)
201
-
202
-
### 9. Check for extension hooks
203
-
204
-
After reporting, check if `.specify/extensions.yml` exists in the project root.
205
-
- If it exists, read it and look for entries under the `hooks.after_analyze` key
206
-
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
207
-
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
208
-
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
209
-
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
210
-
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
211
-
- For each executable hook, output the following based on its `optional` flag:
212
-
- **Optional hook** (`optional: true`):
213
-
```
214
-
## Extension Hooks
215
-
216
-
**Optional Hook**: {extension}
217
-
Command: `/{command}`
218
-
Description: {description}
219
-
220
-
Prompt: {prompt}
221
-
To execute: `/{command}`
222
-
```
223
-
- **Mandatory hook** (`optional: false`):
224
-
```
225
-
## Extension Hooks
226
-
227
-
**Automatic Hook**: {extension}
228
-
Executing: `/{command}`
229
-
EXECUTE_COMMAND: {command}
230
-
```
231
-
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
232
-
233
-
## Operating Principles
234
-
235
-
### Context Efficiency
236
-
237
-
- **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation
238
-
- **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis
0 commit comments