Skip to content

Commit f9d2762

Browse files
aligneddevaligneddev
andauthored
014 ride notes (#35)
* upgrade speckit * notes impoelmentation --------- Co-authored-by: aligneddev <aligneddev@github.com>
1 parent 8fad652 commit f9d2762

File tree

79 files changed

+5363
-107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+5363
-107
lines changed

.github/agents/speckit.analyze.agent.md

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,40 @@ $ARGUMENTS
1010

1111
You **MUST** consider the user input before proceeding (if not empty).
1212

13+
## Pre-Execution Checks
14+
15+
**Check for extension hooks (before analysis)**:
16+
- Check if `.specify/extensions.yml` exists in the project root.
17+
- If it exists, read it and look for entries under the `hooks.before_analyze` key
18+
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
19+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
20+
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
21+
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
22+
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
23+
- For each executable hook, output the following based on its `optional` flag:
24+
- **Optional hook** (`optional: true`):
25+
```
26+
## Extension Hooks
27+
28+
**Optional Pre-Hook**: {extension}
29+
Command: `/{command}`
30+
Description: {description}
31+
32+
Prompt: {prompt}
33+
To execute: `/{command}`
34+
```
35+
- **Mandatory hook** (`optional: false`):
36+
```
37+
## Extension Hooks
38+
39+
**Automatic Pre-Hook**: {extension}
40+
Executing: `/{command}`
41+
EXECUTE_COMMAND: {command}
42+
43+
Wait for the result of the hook command before proceeding to the Goal.
44+
```
45+
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
46+
1347
## Goal
1448
1549
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.tasks` has successfully produced a complete `tasks.md`.
@@ -41,7 +75,7 @@ Load only the minimal necessary context from each artifact:
4175
4276
- Overview/Context
4377
- Functional Requirements
44-
- Non-Functional Requirements
78+
- Success Criteria (measurable outcomes — e.g., performance, security, availability, user success, business impact)
4579
- User Stories
4680
- Edge Cases (if present)
4781
@@ -68,7 +102,7 @@ Load only the minimal necessary context from each artifact:
68102
69103
Create internal representations (do not include raw artifacts in output):
70104
71-
- **Requirements inventory**: Each functional + non-functional requirement with a stable key (derive slug based on imperative phrase; e.g., "User can upload file" → `user-can-upload-file`)
105+
- **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%").
72106
- **User story/action inventory**: Discrete user actions with acceptance criteria
73107
- **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
74108
- **Constitution rule set**: Extract principle names and MUST/SHOULD normative statements
@@ -102,7 +136,7 @@ Focus on high-signal findings. Limit to 50 findings total; aggregate remainder i
102136
103137
- Requirements with zero associated tasks
104138
- Tasks with no mapped requirement/story
105-
- Non-functional requirements not reflected in tasks (e.g., performance, security)
139+
- Success Criteria requiring buildable work (performance, security, availability) not reflected in tasks
106140
107141
#### F. Inconsistency
108142
@@ -162,6 +196,37 @@ At end of report, output a concise Next Actions block:
162196
163197
Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)
164198
199+
### 9. Check for extension hooks
200+
201+
After reporting, check if `.specify/extensions.yml` exists in the project root.
202+
- If it exists, read it and look for entries under the `hooks.after_analyze` key
203+
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
204+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
205+
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
206+
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
207+
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
208+
- For each executable hook, output the following based on its `optional` flag:
209+
- **Optional hook** (`optional: true`):
210+
```
211+
## Extension Hooks
212+
213+
**Optional Hook**: {extension}
214+
Command: `/{command}`
215+
Description: {description}
216+
217+
Prompt: {prompt}
218+
To execute: `/{command}`
219+
```
220+
- **Mandatory hook** (`optional: false`):
221+
```
222+
## Extension Hooks
223+
224+
**Automatic Hook**: {extension}
225+
Executing: `/{command}`
226+
EXECUTE_COMMAND: {command}
227+
```
228+
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
229+
165230
## Operating Principles
166231
167232
### Context Efficiency

.github/agents/speckit.checklist.agent.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,40 @@ $ARGUMENTS
3131

3232
You **MUST** consider the user input before proceeding (if not empty).
3333

34+
## Pre-Execution Checks
35+
36+
**Check for extension hooks (before checklist generation)**:
37+
- Check if `.specify/extensions.yml` exists in the project root.
38+
- If it exists, read it and look for entries under the `hooks.before_checklist` key
39+
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
40+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
41+
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
42+
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
43+
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
44+
- For each executable hook, output the following based on its `optional` flag:
45+
- **Optional hook** (`optional: true`):
46+
```
47+
## Extension Hooks
48+
49+
**Optional Pre-Hook**: {extension}
50+
Command: `/{command}`
51+
Description: {description}
52+
53+
Prompt: {prompt}
54+
To execute: `/{command}`
55+
```
56+
- **Mandatory hook** (`optional: false`):
57+
```
58+
## Extension Hooks
59+
60+
**Automatic Pre-Hook**: {extension}
61+
Executing: `/{command}`
62+
EXECUTE_COMMAND: {command}
63+
64+
Wait for the result of the hook command before proceeding to the Execution Steps.
65+
```
66+
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
67+
3468
## Execution Steps
3569
3670
1. **Setup**: Run `.specify/scripts/powershell/check-prerequisites.ps1 -Json` from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS list.
@@ -293,3 +327,35 @@ Sample items:
293327
- Correct: Validation of requirement quality
294328
- Wrong: "Does it do X?"
295329
- Correct: "Is X clearly specified?"
330+
331+
## Post-Execution Checks
332+
333+
**Check for extension hooks (after checklist generation)**:
334+
Check if `.specify/extensions.yml` exists in the project root.
335+
- If it exists, read it and look for entries under the `hooks.after_checklist` key
336+
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
337+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
338+
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
339+
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
340+
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
341+
- For each executable hook, output the following based on its `optional` flag:
342+
- **Optional hook** (`optional: true`):
343+
```
344+
## Extension Hooks
345+
346+
**Optional Hook**: {extension}
347+
Command: `/{command}`
348+
Description: {description}
349+
350+
Prompt: {prompt}
351+
To execute: `/{command}`
352+
```
353+
- **Mandatory hook** (`optional: false`):
354+
```
355+
## Extension Hooks
356+
357+
**Automatic Hook**: {extension}
358+
Executing: `/{command}`
359+
EXECUTE_COMMAND: {command}
360+
```
361+
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently

.github/agents/speckit.clarify.agent.md

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,40 @@ $ARGUMENTS
1414

1515
You **MUST** consider the user input before proceeding (if not empty).
1616

17+
## Pre-Execution Checks
18+
19+
**Check for extension hooks (before clarification)**:
20+
- Check if `.specify/extensions.yml` exists in the project root.
21+
- If it exists, read it and look for entries under the `hooks.before_clarify` key
22+
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
23+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
24+
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
25+
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
26+
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
27+
- For each executable hook, output the following based on its `optional` flag:
28+
- **Optional hook** (`optional: true`):
29+
```
30+
## Extension Hooks
31+
32+
**Optional Pre-Hook**: {extension}
33+
Command: `/{command}`
34+
Description: {description}
35+
36+
Prompt: {prompt}
37+
To execute: `/{command}`
38+
```
39+
- **Mandatory hook** (`optional: false`):
40+
```
41+
## Extension Hooks
42+
43+
**Automatic Pre-Hook**: {extension}
44+
Executing: `/{command}`
45+
EXECUTE_COMMAND: {command}
46+
47+
Wait for the result of the hook command before proceeding to the Outline.
48+
```
49+
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
50+
1751
## Outline
1852
1953
Goal: Detect and reduce ambiguity or missing decision points in the active feature specification and record the clarifications directly in the spec file.
@@ -142,7 +176,7 @@ Execution steps:
142176
- Functional ambiguity → Update or add a bullet in Functional Requirements.
143177
- User interaction / actor distinction → Update User Stories or Actors subsection (if present) with clarified role, constraint, or scenario.
144178
- Data shape / entities → Update Data Model (add fields, types, relationships) preserving ordering; note added constraints succinctly.
145-
- Non-functional constraint → Add/modify measurable criteria in Non-Functional / Quality Attributes section (convert vague adjective to metric or explicit target).
179+
- Non-functional constraint → Add/modify measurable criteria in Success Criteria > Measurable Outcomes (convert vague adjective to metric or explicit target).
146180
- Edge case / negative flow → Add a new bullet under Edge Cases / Error Handling (or create such subsection if template provides placeholder for it).
147181
- Terminology conflict → Normalize term across spec; retain original only if necessary by adding `(formerly referred to as "X")` once.
148182
- If the clarification invalidates an earlier ambiguous statement, replace that statement instead of duplicating; leave no obsolete contradictory text.
@@ -179,3 +213,35 @@ Behavior rules:
179213
- If quota reached with unresolved high-impact categories remaining, explicitly flag them under Deferred with rationale.
180214
181215
Context for prioritization: $ARGUMENTS
216+
217+
## Post-Execution Checks
218+
219+
**Check for extension hooks (after clarification)**:
220+
Check if `.specify/extensions.yml` exists in the project root.
221+
- If it exists, read it and look for entries under the `hooks.after_clarify` key
222+
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
223+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
224+
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
225+
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
226+
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
227+
- For each executable hook, output the following based on its `optional` flag:
228+
- **Optional hook** (`optional: true`):
229+
```
230+
## Extension Hooks
231+
232+
**Optional Hook**: {extension}
233+
Command: `/{command}`
234+
Description: {description}
235+
236+
Prompt: {prompt}
237+
To execute: `/{command}`
238+
```
239+
- **Mandatory hook** (`optional: false`):
240+
```
241+
## Extension Hooks
242+
243+
**Automatic Hook**: {extension}
244+
Executing: `/{command}`
245+
EXECUTE_COMMAND: {command}
246+
```
247+
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently

.github/agents/speckit.constitution.agent.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,40 @@ $ARGUMENTS
1414

1515
You **MUST** consider the user input before proceeding (if not empty).
1616

17+
## Pre-Execution Checks
18+
19+
**Check for extension hooks (before constitution update)**:
20+
- Check if `.specify/extensions.yml` exists in the project root.
21+
- If it exists, read it and look for entries under the `hooks.before_constitution` key
22+
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
23+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
24+
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
25+
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
26+
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
27+
- For each executable hook, output the following based on its `optional` flag:
28+
- **Optional hook** (`optional: true`):
29+
```
30+
## Extension Hooks
31+
32+
**Optional Pre-Hook**: {extension}
33+
Command: `/{command}`
34+
Description: {description}
35+
36+
Prompt: {prompt}
37+
To execute: `/{command}`
38+
```
39+
- **Mandatory hook** (`optional: false`):
40+
```
41+
## Extension Hooks
42+
43+
**Automatic Pre-Hook**: {extension}
44+
Executing: `/{command}`
45+
EXECUTE_COMMAND: {command}
46+
47+
Wait for the result of the hook command before proceeding to the Outline.
48+
```
49+
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
50+
1751
## Outline
1852
1953
You are updating the project constitution at `.specify/memory/constitution.md`. This file is a TEMPLATE containing placeholder tokens in square brackets (e.g. `[PROJECT_NAME]`, `[PRINCIPLE_1_NAME]`). Your job is to (a) collect/derive concrete values, (b) fill the template precisely, and (c) propagate any amendments across dependent artifacts.
@@ -82,3 +116,35 @@ If the user supplies partial updates (e.g., only one principle revision), still
82116
If critical info missing (e.g., ratification date truly unknown), insert `TODO(<FIELD_NAME>): explanation` and include in the Sync Impact Report under deferred items.
83117
84118
Do not create a new template; always operate on the existing `.specify/memory/constitution.md` file.
119+
120+
## Post-Execution Checks
121+
122+
**Check for extension hooks (after constitution update)**:
123+
Check if `.specify/extensions.yml` exists in the project root.
124+
- If it exists, read it and look for entries under the `hooks.after_constitution` key
125+
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
126+
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
127+
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
128+
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
129+
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
130+
- For each executable hook, output the following based on its `optional` flag:
131+
- **Optional hook** (`optional: true`):
132+
```
133+
## Extension Hooks
134+
135+
**Optional Hook**: {extension}
136+
Command: `/{command}`
137+
Description: {description}
138+
139+
Prompt: {prompt}
140+
To execute: `/{command}`
141+
```
142+
- **Mandatory hook** (`optional: false`):
143+
```
144+
## Extension Hooks
145+
146+
**Automatic Hook**: {extension}
147+
Executing: `/{command}`
148+
EXECUTE_COMMAND: {command}
149+
```
150+
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
description: Auto-commit changes after a Spec Kit command completes
3+
---
4+
5+
6+
<!-- Extension: git -->
7+
<!-- Config: .specify/extensions/git/ -->
8+
# Auto-Commit Changes
9+
10+
Automatically stage and commit all changes after a Spec Kit command completes.
11+
12+
## Behavior
13+
14+
This command is invoked as a hook after (or before) core commands. It:
15+
16+
1. Determines the event name from the hook context (e.g., if invoked as an `after_specify` hook, the event is `after_specify`; if `before_plan`, the event is `before_plan`)
17+
2. Checks `.specify/extensions/git/git-config.yml` for the `auto_commit` section
18+
3. Looks up the specific event key to see if auto-commit is enabled
19+
4. Falls back to `auto_commit.default` if no event-specific key exists
20+
5. Uses the per-command `message` if configured, otherwise a default message
21+
6. If enabled and there are uncommitted changes, runs `git add .` + `git commit`
22+
23+
## Execution
24+
25+
Determine the event name from the hook that triggered this command, then run the script:
26+
27+
- **Bash**: `.specify/extensions/git/scripts/bash/auto-commit.sh <event_name>`
28+
- **PowerShell**: `.specify/extensions/git/scripts/powershell/auto-commit.ps1 <event_name>`
29+
30+
Replace `<event_name>` with the actual hook event (e.g., `after_specify`, `before_plan`, `after_implement`).
31+
32+
## Configuration
33+
34+
In `.specify/extensions/git/git-config.yml`:
35+
36+
```yaml
37+
auto_commit:
38+
default: false # Global toggle — set true to enable for all commands
39+
after_specify:
40+
enabled: true # Override per-command
41+
message: "[Spec Kit] Add specification"
42+
after_plan:
43+
enabled: false
44+
message: "[Spec Kit] Add implementation plan"
45+
```
46+
47+
## Graceful Degradation
48+
49+
- If Git is not available or the current directory is not a repository: skips with a warning
50+
- If no config file exists: skips (disabled by default)
51+
- If no changes to commit: skips with a message

0 commit comments

Comments
 (0)