Skip to content

Commit d4049ae

Browse files
committed
chore: configure spec-kit governance presets
1 parent 56b998c commit d4049ae

114 files changed

Lines changed: 5558 additions & 2070 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 68 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,147 +1,91 @@
11
---
2-
name: "speckit-plan"
3-
description: "Execute the implementation planning workflow using the plan template to generate design artifacts."
4-
compatibility: "Requires spec-kit project structure with .specify/ directory"
2+
name: speckit-plan
3+
description: Generate technical implementation plans from feature specifications.
4+
compatibility: Requires spec-kit project structure with .specify/ directory
55
metadata:
6-
author: "github-spec-kit"
7-
source: "templates/commands/plan.md"
6+
author: github-spec-kit
7+
source: preset:security-governance
88
---
99

10+
# Speckit Plan Skill
1011

11-
## User Input
12-
13-
```text
14-
$ARGUMENTS
15-
```
16-
17-
You **MUST** consider the user input before proceeding (if not empty).
18-
19-
## Pre-Execution Checks
20-
21-
**Check for extension hooks (before planning)**:
22-
- Check if `.specify/extensions.yml` exists in the project root.
23-
- If it exists, read it and look for entries under the `hooks.before_plan` key
24-
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
25-
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
26-
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
27-
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
28-
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
29-
- For each executable hook, output the following based on its `optional` flag:
30-
- **Optional hook** (`optional: true`):
31-
```
32-
## Extension Hooks
33-
34-
**Optional Pre-Hook**: {extension}
35-
Command: `/{command}`
36-
Description: {description}
37-
38-
Prompt: {prompt}
39-
To execute: `/{command}`
40-
```
41-
- **Mandatory hook** (`optional: false`):
42-
```
43-
## Extension Hooks
44-
45-
**Automatic Pre-Hook**: {extension}
46-
Executing: `/{command}`
47-
EXECUTE_COMMAND: {command}
12+
Before continuing, apply the Security Governance preset:
4813

49-
Wait for the result of the hook command before proceeding to the Outline.
50-
```
51-
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
14+
- plan explicit MSL applicability or non-MSL justification work when relevant
15+
- plan explicit secure-development verification work
16+
- plan dependency and supply-chain evidence updates where relevant
17+
- surface security review checkpoints instead of leaving them implicit
5218

53-
## Outline
19+
Before continuing, apply the Architecture Governance preset:
5420

55-
1. **Setup**: Run `.specify/scripts/bash/setup-plan.sh --json` from repo root and parse JSON for FEATURE_SPEC, IMPL_PLAN, SPECS_DIR, BRANCH. 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").
21+
- plan explicit architecture evidence work
22+
- plan threat-model and ADR updates when boundaries, integrations, or flows
23+
change
24+
- surface Zero Trust and SAMM work explicitly when relevant
5625

57-
2. **Load context**: Read FEATURE_SPEC and `.specify/memory/constitution.md`. Load IMPL_PLAN template (already copied).
26+
Before continuing, apply the iSAQB Architecture Governance preset:
5827

59-
3. **Execute plan workflow**: Follow the structure in IMPL_PLAN template to:
60-
- Fill Technical Context (mark unknowns as "NEEDS CLARIFICATION")
61-
- Fill Constitution Check section from constitution
62-
- Evaluate gates (ERROR if violations unjustified)
63-
- Phase 0: Generate research.md (resolve all NEEDS CLARIFICATION)
64-
- Phase 1: Generate data-model.md, contracts/, quickstart.md
65-
- Phase 1: Update agent context by running the agent script
66-
- Re-evaluate Constitution Check post-design
28+
- plan explicit architecture work products where the feature changes
29+
structure, interfaces, quality attributes, runtime behavior, or
30+
deployment
31+
- plan updates to architecture views under `docs/architecture/`
32+
- plan ADRs for architecturally significant decisions
33+
- plan risk and technical-debt review for trade-offs or unresolved
34+
constraints
35+
- if security-relevant architecture is affected, also plan the
36+
secure-architecture evidence from `architecture-governance`
6737

68-
4. **Stop and report**: Command ends after Phase 2 planning. Report branch, IMPL_PLAN path, and generated artifacts.
38+
Before continuing, apply the A11Y Governance preset:
6939

70-
5. **Check for extension hooks**: After reporting, check if `.specify/extensions.yml` exists in the project root.
71-
- If it exists, read it and look for entries under the `hooks.after_plan` key
72-
- If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
73-
- Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
74-
- For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
75-
- If the hook has no `condition` field, or it is null/empty, treat the hook as executable
76-
- If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
77-
- For each executable hook, output the following based on its `optional` flag:
78-
- **Optional hook** (`optional: true`):
79-
```
80-
## Extension Hooks
40+
- plan accessibility review work explicitly
41+
- plan bilingual content work explicitly
42+
- include CLI accessibility checks where user-facing terminal output is changed
8143

82-
**Optional Hook**: {extension}
83-
Command: `/{command}`
84-
Description: {description}
44+
Before continuing, apply the Cross-Platform Governance preset:
8545

86-
Prompt: {prompt}
87-
To execute: `/{command}`
88-
```
89-
- **Mandatory hook** (`optional: false`):
90-
```
91-
## Extension Hooks
46+
- plan paired Bash + PowerShell script work as a single unit
47+
- plan the man-page, the bilingual PowerShell help block, and the
48+
`Verb-Noun` Cmdlet alongside the script
49+
- plan manual verification on at least one target OS per variant
50+
- plan implementation discipline checks (Bash quoting, `set -euo
51+
pipefail`, `Set-StrictMode -Version Latest`, `-NoProfile`) and the
52+
parity-checklist artefact
9253

93-
**Automatic Hook**: {extension}
94-
Executing: `/{command}`
95-
EXECUTE_COMMAND: {command}
96-
```
97-
- If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
54+
Before continuing, apply the Agent Parity Governance preset:
9855

99-
## Phases
56+
- plan an atomic update across all maintained agent surfaces
57+
- plan synchronised updates to project templates and the local
58+
`.specify/memory/constitution.md`
59+
- plan a parity-verification artefact for the change
60+
61+
# Command Template: `/speckit.plan`
62+
63+
Use this command to produce an implementation plan from an approved specification.
64+
65+
## Required Actions
66+
67+
1. Populate technical context with real stack details.
68+
2. Execute the Constitution Check gates explicitly:
69+
- branching and PR flow
70+
- .NET 10 + C# 14.0 toolchain alignment
71+
- architecture/layer boundaries
72+
- bilingual CEFR B2 documentation scope
73+
- XML documentation + DocFX regeneration scope
74+
- Red-Green-Refactor testing scope
75+
- coverage gate (`>=70%` minimum, `>=80%` target)
76+
- NuGet dependency currency and pinning exceptions
77+
- serialization/data conventions
78+
3. Document concrete project structure for this feature.
79+
4. Record justified exceptions in Complexity Tracking.
80+
81+
## Validation Checklist
82+
83+
- No gate is left unresolved without rationale.
84+
- Test, coverage, dependency, and documentation impacts are planned before implementation.
10085

101-
### Phase 0: Outline & Research
10286

103-
1. **Extract unknowns from Technical Context** above:
104-
- For each NEEDS CLARIFICATION → research task
105-
- For each dependency → best practices task
106-
- For each integration → patterns task
10787

108-
2. **Generate and dispatch research agents**:
10988

110-
```text
111-
For each unknown in Technical Context:
112-
Task: "Research {unknown} for {feature context}"
113-
For each technology choice:
114-
Task: "Find best practices for {tech} in {domain}"
115-
```
116-
117-
3. **Consolidate findings** in `research.md` using format:
118-
- Decision: [what was chosen]
119-
- Rationale: [why chosen]
120-
- Alternatives considered: [what else evaluated]
121-
122-
**Output**: research.md with all NEEDS CLARIFICATION resolved
123-
124-
### Phase 1: Design & Contracts
125-
126-
**Prerequisites:** `research.md` complete
127-
128-
1. **Extract entities from feature spec**`data-model.md`:
129-
- Entity name, fields, relationships
130-
- Validation rules from requirements
131-
- State transitions if applicable
132-
133-
2. **Define interface contracts** (if project has external interfaces) → `/contracts/`:
134-
- Identify what interfaces the project exposes to users or other systems
135-
- Document the contract format appropriate for the project type
136-
- Examples: public APIs for libraries, command schemas for CLI tools, endpoints for web services, grammars for parsers, UI contracts for applications
137-
- Skip if project is purely internal (build scripts, one-off tools, etc.)
138-
139-
3. **Agent context update**:
140-
- Update the plan reference between the `<!-- SPECKIT START -->` and `<!-- SPECKIT END -->` markers in `AGENTS.md` to point to the plan file created in step 1 (the IMPL_PLAN path)
14189

142-
**Output**: data-model.md, /contracts/*, quickstart.md, updated agent context file
14390

144-
## Key rules
14591

146-
- Use absolute paths for filesystem operations; use project-relative paths for references in documentation and agent context files
147-
- ERROR on gate failures or unresolved clarifications

.agents/skills/speckit-specify/SKILL.md

Lines changed: 78 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,66 @@
11
---
2-
name: "speckit-specify"
3-
description: "Create or update the feature specification from a natural language feature description."
4-
compatibility: "Requires spec-kit project structure with .specify/ directory"
2+
name: speckit-specify
3+
description: Create or update feature specifications from natural language descriptions.
4+
compatibility: Requires spec-kit project structure with .specify/ directory
55
metadata:
6-
author: "github-spec-kit"
7-
source: "templates/commands/specify.md"
6+
author: github-spec-kit
7+
source: preset:security-governance
88
---
99

10+
# Speckit Specify Skill
11+
12+
Before continuing, apply the Security Governance preset:
13+
14+
- determine whether the primary implementation language is memory-safe
15+
- document a short justification if the language is not memory-safe
16+
- determine whether `NIST SSDF`, `CWE Top 25`, `OWASP ASVS`, `SBOM`, `VEX`,
17+
and `SLSA` are relevant
18+
- document `N/A` decisions with rationale
19+
- identify which security evidence artefacts should be created or updated under
20+
`docs/security/`
21+
22+
Before continuing, apply the Architecture Governance preset:
23+
24+
- identify whether runtime or hardware constraints affect memory-safe language
25+
choice
26+
- identify trust boundaries affected by the requested work
27+
- determine whether threat modeling, ADR updates, or Zero Trust review apply
28+
- document `N/A` decisions with rationale
29+
30+
Before continuing, apply the iSAQB Architecture Governance preset:
31+
32+
- identify whether the feature affects architecture goals, context,
33+
quality attributes, interfaces, runtime behavior, deployment, or
34+
technical debt
35+
- record the architecture evidence expected under `docs/architecture/`
36+
- identify whether general ADRs or architecture-risk records are needed
37+
- if security-relevant architecture is affected, also apply the
38+
`architecture-governance` secure-architecture preset
39+
40+
Before continuing, apply the A11Y Governance preset:
41+
42+
- determine which user-facing artefacts are affected
43+
- apply `WCAG 2.2 AA` where relevant
44+
- determine whether bilingual delivery is required
45+
- determine whether `docs/accessibility/` evidence should be updated
46+
- document `N/A` decisions with rationale
47+
48+
Before continuing, apply the Cross-Platform Governance preset:
49+
50+
- identify whether this feature adds, changes, or removes a
51+
script-shaped tool
52+
- record that both Bash (`*.sh`) and PowerShell (`*.ps1`) variants are
53+
in scope, plus a Unix man-page and a bilingual PowerShell help block
54+
- record the planned `Verb-Noun` Cmdlet name (approved verbs only)
55+
- record dry-run / `-WhatIf` parity expectations
56+
57+
Before continuing, apply the Agent Parity Governance preset:
58+
59+
- identify whether shared agent guidance, project templates, or
60+
`.specify/memory/constitution.md` is affected
61+
- list every maintained agent surface that must be updated together
62+
- record any intentional deviation explicitly
63+
1064

1165
## User Input
1266

@@ -52,7 +106,7 @@ You **MUST** consider the user input before proceeding (if not empty).
52106
53107
## Outline
54108
55-
The text the user typed after `/speckit-specify` in the triggering message **is** the feature description. Assume you always have it available in this conversation even if `$ARGUMENTS` appears literally below. Do not ask the user to repeat it unless they provided an empty command.
109+
The text the user typed after `__SPECKIT_COMMAND_SPECIFY__` in the triggering message **is** the feature description. Assume you always have it available in this conversation even if `$ARGUMENTS` appears literally below. Do not ask the user to repeat it unless they provided an empty command.
56110
57111
Given that feature description, do this:
58112
@@ -98,10 +152,10 @@ Given that feature description, do this:
98152
}
99153
```
100154
Write the actual resolved directory path value (for example, `specs/003-user-auth`), not the literal string `SPECIFY_FEATURE_DIRECTORY`.
101-
This allows downstream commands (`/speckit-plan`, `/speckit-tasks`, etc.) to locate the feature directory without relying on git branch name conventions.
155+
This allows downstream commands (`__SPECKIT_COMMAND_PLAN__`, `__SPECKIT_COMMAND_TASKS__`, etc.) to locate the feature directory without relying on git branch name conventions.
102156
103157
**IMPORTANT**:
104-
- You must only create one feature per `/speckit-specify` invocation
158+
- You must only create one feature per `__SPECKIT_COMMAND_SPECIFY__` invocation
105159
- The spec directory name and the git branch name are independent — they may be the same but that is the user's choice
106160
- The spec directory and file are always created by this command, never by the hook
107161
@@ -140,20 +194,20 @@ Given that feature description, do this:
140194
141195
```markdown
142196
# Specification Quality Checklist: [FEATURE NAME]
143-
197+
144198
**Purpose**: Validate specification completeness and quality before proceeding to planning
145199
**Created**: [DATE]
146200
**Feature**: [Link to spec.md]
147-
201+
148202
## Content Quality
149-
203+
150204
- [ ] No implementation details (languages, frameworks, APIs)
151205
- [ ] Focused on user value and business needs
152206
- [ ] Written for non-technical stakeholders
153207
- [ ] All mandatory sections completed
154-
208+
155209
## Requirement Completeness
156-
210+
157211
- [ ] No [NEEDS CLARIFICATION] markers remain
158212
- [ ] Requirements are testable and unambiguous
159213
- [ ] Success criteria are measurable
@@ -162,17 +216,17 @@ Given that feature description, do this:
162216
- [ ] Edge cases are identified
163217
- [ ] Scope is clearly bounded
164218
- [ ] Dependencies and assumptions identified
165-
219+
166220
## Feature Readiness
167-
221+
168222
- [ ] All functional requirements have clear acceptance criteria
169223
- [ ] User scenarios cover primary flows
170224
- [ ] Feature meets measurable outcomes defined in Success Criteria
171225
- [ ] No implementation details leak into specification
172-
226+
173227
## Notes
174-
175-
- Items marked incomplete require spec updates before `/speckit-clarify` or `/speckit-plan`
228+
229+
- Items marked incomplete require spec updates before `__SPECKIT_COMMAND_CLARIFY__` or `__SPECKIT_COMMAND_PLAN__`
176230
```
177231
178232
b. **Run Validation Check**: Review the spec against each checklist item:
@@ -196,20 +250,20 @@ Given that feature description, do this:
196250
197251
```markdown
198252
## Question [N]: [Topic]
199-
253+
200254
**Context**: [Quote relevant spec section]
201-
255+
202256
**What we need to know**: [Specific question from NEEDS CLARIFICATION marker]
203-
257+
204258
**Suggested Answers**:
205-
259+
206260
| Option | Answer | Implications |
207261
|--------|--------|--------------|
208262
| A | [First suggested answer] | [What this means for the feature] |
209263
| B | [Second suggested answer] | [What this means for the feature] |
210264
| C | [Third suggested answer] | [What this means for the feature] |
211265
| Custom | Provide your own answer | [Explain how to provide custom input] |
212-
266+
213267
**Your choice**: _[Wait for user response]_
214268
```
215269
@@ -230,7 +284,7 @@ Given that feature description, do this:
230284
- `SPECIFY_FEATURE_DIRECTORY` — the feature directory path
231285
- `SPEC_FILE` — the spec file path
232286
- Checklist results summary
233-
- Readiness for the next phase (`/speckit-clarify` or `/speckit-plan`)
287+
- Readiness for the next phase (`__SPECKIT_COMMAND_CLARIFY__` or `__SPECKIT_COMMAND_PLAN__`)
234288
235289
9. **Check for extension hooks**: After reporting completion, check if `.specify/extensions.yml` exists in the project root.
236290
- If it exists, read it and look for entries under the `hooks.after_specify` key

0 commit comments

Comments
 (0)