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
Preset manifests currently require a separate provides.templates entry for every command, template, or script that a preset augments. This creates substantial repetition when the same cross-cutting guidance should apply to several resources.
For example, applying the same implementation guidance to speckit.plan, speckit.tasks, and speckit.implement currently requires three entries that differ only by name.
Add support for regex selectors by allowing the existing name field to use a regex: prefix.
A name beginning with regex: is interpreted as a regular expression.
Matching uses full-name matching semantics rather than substring search.
The expression operates on the logical resource name, not its path, filename, or extension.
Regex declarations match only concrete resource names available from lower layers in the resolution stack:
lower-priority presets
installed and enabled extensions
Spec Kit core
Regex declarations do not match other regex declarations.
Matching is recalculated whenever the relevant preset, extension, or integration state changes.
A regex that currently matches no resources produces a warning rather than failing installation.
Invalid regular expressions fail preset validation with a clear error.
Supported strategies
Existing composition restrictions continue to apply:
Resource type
Supported strategies
Command
replace, prepend, append, wrap
Template
replace, prepend, append, wrap
Script
replace, wrap
Each matched resource behaves as though the preset contained a separate exact-name entry using the same file and strategy.
Resolution behavior
For templates and scripts, the resolver can test regex declarations while resolving a requested concrete resource name.
Commands require expansion into concrete command names before registration because commands are materialized into the active integration's command or skill directory. Expanded command names should then use the existing registration, composition, reconciliation, and cleanup paths.
Preset diagnostics should display both the selector and its concrete matches. For example:
Description
Preset manifests currently require a separate
provides.templatesentry for every command, template, or script that a preset augments. This creates substantial repetition when the same cross-cutting guidance should apply to several resources.For example, applying the same implementation guidance to
speckit.plan,speckit.tasks, andspeckit.implementcurrently requires three entries that differ only byname.Add support for regex selectors by allowing the existing
namefield to use aregex:prefix.Proposed syntax
Existing exact-name declarations remain unchanged:
Matching semantics
namebeginning withregex:is interpreted as a regular expression.Supported strategies
Existing composition restrictions continue to apply:
replace,prepend,append,wrapreplace,prepend,append,wrapreplace,wrapEach matched resource behaves as though the preset contained a separate exact-name entry using the same file and strategy.
Resolution behavior
For templates and scripts, the resolver can test regex declarations while resolving a requested concrete resource name.
Commands require expansion into concrete command names before registration because commands are materialized into the active integration's command or skill directory. Expanded command names should then use the existing registration, composition, reconciliation, and cleanup paths.
Preset diagnostics should display both the selector and its concrete matches. For example:
Acceptance criteria
regex:selectors are supported for commands, templates, and scripts.specify preset infoand resolution diagnostics show the concrete resources matched by each selector.Motivation
This enables concise cross-cutting presets for concerns such as:
The feature preserves the existing preset composition model while removing the need to enumerate every affected resource separately.
Out of scope