[Feature]: Let extensions contribute always-on instructions (not just on-demand commands + hooks)
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 38/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- python, yaml
- Domaine
- cli, documentation, tooling
Piste de recherche
Commencez par retracer le schéma du manifeste de l’extension et les points d’entrée specify extension add ainsi que de désinstallation/mise à jour, puis comparez les marqueurs de fusion existants dans speckit.json et la gestion de .specify/memory/constitution.md. Examinez les cibles d’agents proposées, notamment .github/copilot-instructions.md, AGENTS.md, CLAUDE.md, GEMINI.md et .cursor/rules/. Le travail est considéré comme terminé lorsque les instructions sont validées par rapport au schéma, routées et fusionnées en toute sécurité, supprimables, compatibles avec l’opt-out et documentées pour tous les agents pris en charge.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Problem Statement
Spec Kit extensions can deliver knowledge only two ways today: commands (on-demand prompts/skills the agent must choose to invoke) and hooks (fire around /speckit.implement). Both are opt-in by the agent. So in autonomous / hands-off workflows - increasingly the common case - an extension's guidance often never reaches the model: the agent is given a task, writes code directly, and never invokes the commands, so the extension has no effect.
We hit this building the Azure Cosmos DB Spec Kit extension (pre-release, still in active development). In autonomous agent runs where it was installed exactly as intended, the agent invoked its commands in 0 of 30 runs and the before_implement/after_implement hooks fired 0 times - net effect ≈ zero. There is currently no way for an extension to contribute always-on guidance (a few "always apply this while you work" rules in the agent's persistent context) the way the project constitution does.
Proposed Solution
Add an optional provides: instructions: capability to the extension manifest, so an extension can ship a compact always-on rule block that specify extension add installs into the agent-native always-on file for the active integration:
provides:
commands: [ ... ] # unchanged
hooks: [ ... ] # unchanged
instructions: # NEW
- file: instructions/best-practices.md
Install it as a delimited, per-extension block so it is merge-safe (multiple extensions coexist; user-authored content preserved), idempotent, removable on uninstall, and routed per agent (.github/copilot-instructions.md for Copilot; AGENTS.md / CLAUDE.md / GEMINI.md; .cursor/rules/…) - or appended to .specify/memory/constitution.md if a single canonical target is preferred.
This looks very feasible because Spec Kit already has the building blocks and would reuse all three rather than invent a subsystem: an always-on context concept (the constitution), per-agent routing, and merge-with-markers for extension content (hooks -> speckit.json).
Evidence it matters: delivering the same guidance as an always-on rule block instead of commands improved a best-practice conformance score by +0.16 mean (vs +0.10 as commands), with better determinism and improvement in every measured cell (2 models × 4 languages × 3 complexity levels) - because always-on context can't be bypassed.
Alternatives Considered
- A hook that writes the always-on file at
before_implement. Unreliable: agents load instruction files at session start, so writing mid-session isn't picked up; also couples always-on context to the implement step. - Docs-only ("paste these rules into your copilot-instructions.md"). Manual, easily skipped, not portable across agents, and defeats the point of an extension.
- Status quo (everything as commands/hooks). Proven not to reach autonomous agents (the 0/30 invocation above).
Component
Specify CLI (initialization, commands)
AI Agent (if applicable)
All agents
Use Cases
- A domain extension (e.g. Azure Cosmos DB) wants its few mandatory best-practices followed even when an autonomous agent never runs a command.
- A security / hardening extension wants "always apply these secure-coding rules" in context for every generation.
- An IaC / framework / accessibility extension wants its house style enforced across a whole session without the user or agent invoking anything.
- A team installs several extensions and wants each one's key rules merged, attributed, and cleanly removable, alongside their own project constitution.
Acceptance Criteria
-
provides: instructions:is accepted in the extension manifest schema. -
specify extension addinstalls each instructions file into the correct always-on location for the active integration. - Content is written as a delimited, attributed block that merges safely with user content and with other extensions.
- Uninstall / update cleanly removes or replaces the extension's block.
- Users can disable extension-provided instructions (globally or per extension).
- Works across supported agents (or a documented no-op where an agent has no always-on file).
- Documentation updated.
Additional Context
- General gap, not Cosmos-specific. Any extension whose value is best-practice guidance (security, IaC, API-design, framework, accessibility, …) hits the same wall - commands only help if the agent opts to run them. Azure Cosmos DB is just where we measured it.
- Design notes (input welcome): keep instructions compact — always-on text costs tokens on every request, so a soft size cap / lint is worth considering; user-authored instructions and the constitution should take precedence over extension blocks; ensure deterministic ordering; support opt-out.
- Forward-looking: the extension that surfaced this is still pre-release; we want to align its delivery model with Spec Kit's direction before shipping broadly - this is not a report of a regression in a shipped extension.
- We have the full delivery-mechanism A/B data (models × languages × complexity) and a reference compact rule block, and are happy to share or prototype the capability.
- Langage dominant
- Python
- Étoiles
- 139k
- Forks
- 12.5k
- Merge moyen
- 2 j 5 h
- PR mergées (30 j)
- 164
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de github/spec-kit
-
triage-nice-to-have
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
feature-assess feature-go triage-can-wait
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
github/spec-kit#4804 · 6 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
needs-triage triage-nice-to-have
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
github/spec-kit#4527 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: specify init writes speckit.manifest.json without the speckit-converge skill it just installedPeut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouvertebug-assess severity-medium
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
github/spec-kit#4273 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: /speckit-implement counts checkbox markers inside fenced code blocks — example checkboxes can falsely block implementationPeut-être pris @ntdatt812 l’a pris il y a 24 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de github/spec-kit
Issues similaires
-
json_params_matcher fails on falsy top-level JSON primitives (0, False, "")Peut-être pris @mayureshsonawane17 l’a pris aujourd’hui. OuverteWaiting for: Product Owner
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 5 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
第二章思考题 8:Skill 追加到末尾不必每轮重新计算 KVOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
bojieli/ai-agent-book#1169 ·
Les mainteneurs répondent en général sous 1 jour
-
priority:low ready-for-dev
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
OpenHands/extensions#738 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
micronaut-projects/micronaut-core#13677 ·
Les mainteneurs répondent en général sous 1 jour