[Feature]: Let extensions contribute always-on instructions (not just on-demand commands + hooks)
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.
Feature assessment โ extension-always-on-instructions ยท Stage 1/5: Intake
Idea Intake: Extension Always-On Instructions
- Slug: extension-always-on-instructions
- Created: 2026-08-19
- Source: GitHub issue #4200 (https://github.com/github/spec-kit/issues/4200) โ labeled
feature-assess, raised by @TheovanKraay - Type: new-capability
Idea (as captured)
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.Add an optional
provides: instructions:capability to the extension manifest, so an extension can ship a compact always-on rule block thatspecify extension addinstalls into the agent-native always-on file for the active integration (.github/copilot-instructions.md,AGENTS.md,CLAUDE.md,GEMINI.md,.cursor/rules/...) or appended to.specify/memory/constitution.md. Content written as a delimited, attributed, merge-safe block. Removable on uninstall.Evidence cited by the author: delivering guidance as an always-on rule block vs. commands improved a best-practice conformance score by +0.16 mean (vs +0.10 as commands), measured across 2 models ร 4 languages ร 3 complexity levels โ improvement in every measured cell.
Restated
Extensions today can only inject guidance when an agent actively invokes a command or a hook fires; autonomous agents skip both. The proposal adds a new provides: instructions: manifest field so that specify extension add can install a compact, per-extension rule block into the agent's always-on context file, making the guidance unconditionally present from session start.
Origin & Context
- Raised by: @TheovanKraay (GitHub)
- Trigger: Building the Azure Cosmos DB Spec Kit extension (pre-release). In autonomous agent runs, the extension's commands were invoked in 0 of 30 runs and
before_implement/after_implementhooks fired 0 times โ net effect โ zero. Authors have A/B delivery data and a reference compact rule block ready to share.
First-Glance Unknowns
- [NEEDS CLARIFICATION: What is the intended canonical target โ per-agent always-on file (routing matrix) vs.
.specify/memory/constitution.mdvs. both?] - [NEEDS CLARIFICATION: What size limit / lint threshold is acceptable for extension-provided instruction blocks?]
- [NEEDS CLARIFICATION: How should ordering and precedence among multiple extensions (and the user's own constitution) be defined?]
- [NEEDS CLARIFICATION: Is per-extension opt-out sufficient, or does a per-project global disable also need to be supported?]
- [NEEDS CLARIFICATION: For agents with no always-on file (or an unsupported integration), is a silent no-op acceptable, or must it be surfaced as a warning?]
Generated by ๐ก Assess a Feature Request by Installing and Running Spec Kit for issue #4200 ยท 478.7 AIC ยท โ 35.8 AIC ยท โ 36.5K ยท โท
Feature assessment โ extension-always-on-instructions ยท Stage 2/5: Research
Idea Research: Extension Always-On Instructions
- Slug: extension-always-on-instructions
- Created: 2026-08-19
- Evidence confidence (overall): medium
Users & Demand
- Extension authors building domain/best-practice extensions: The submitter (@TheovanKraay, Azure Cosmos DB extension author) reports 0/30 autonomous agent runs invoking extension commands, and 0
before_implement/after_implementhook fires โ cited as direct, first-hand measurement (confidence: high, cited: issue #4200). - Any extension whose value is best-practice guidance (security, IaC, framework, accessibility): The submitter identifies this as a general gap, not Cosmos-specific. The class of affected extensions is plausibly large, but broader community demand data is not provided (confidence: medium, assumption).
- Autonomous/hands-off workflow users: The feature request notes autonomous workflows as "increasingly the common case." Supporting evidence from usage data is not provided in the issue; consistent with industry trends but unverified within Spec Kit telemetry (confidence: low, assumption).
Prior Art
- Spec Kit
agent-contextextension (internal): Already delivers marker-based merge into agent-native context files (.github/copilot-instructions.md,CLAUDE.md,AGENTS.md, etc.) using<!-- SPECKIT START -->/<!-- SPECKIT END -->delimiters, per-agent routing, and install/uninstall lifecycle. This is the most directly reusable prior art โ the feature request would extend this mechanism to cover extension-contributed blocks. Source:extensions/agent-context/,extensions/agent-context/scripts/bash/update-agent-context.sh(confidence: high, cited: codebase). - Spec Kit constitution (internal):
.specify/memory/constitution.mdis the project's always-on context file, already surfaced to agents as persistent guidance. An alternative implementation could append extension instructions here rather than routing to per-agent files. Source: codebase (confidence: high, cited: codebase). - Extension manifest
provides:schema (internal): Currently supportscommands,templates,scripts,config. Noinstructionskey exists. Codebase search confirms zero results forprovides.*instructions. Extending the schema is a well-trodden pattern. Source:src/specify_cli/extensions/__init__.py(confidence: high, cited: codebase). - VS Code extension contributions: VS Code uses
contributes.*inpackage.jsonto let extensions inject into workspace-level files at install time โ conceptually identical to whatprovides: instructions:proposes (confidence: high, cited: industry knowledge). - No prior Spec Kit RFC or spec found for this capability (confidence: high, cited: codebase search).
Market & Context
- Cost of doing nothing: Extension authors who need best-practice enforcement must choose between docs-only instructions, commands that autonomous agents skip, or not shipping the extension's core value. This weakens the extension ecosystem for the agentic-first use case (confidence: medium, cited: issue #4200).
- Alternatives users rely on today: The submitter considered and rejected: (a) a hook that writes the always-on file at
before_implementโ unreliable because agents load instruction files at session start, not mid-session; (b) docs-only โ manual, not portable. Both documented in issue #4200 (confidence: high, cited: issue #4200). - Token cost concern: Always-on context costs tokens on every request. The submitter acknowledges this and suggests a soft size cap / lint. Genuine adoption-limiting constraint (confidence: high, cited: issue #4200).
Data & Constraints
- A/B conformance data (submitter-provided, unverified): Always-on rule block vs. commands showed +0.16 mean conformance improvement (vs. +0.10 for commands) across 2 models ร 4 languages ร 3 complexity levels, with improvement in every cell (confidence: medium, cited: issue #4200 โ reported by feature author, not independently reproduced).
- 0/30 autonomous invocations: Extension commands invoked 0 times in 30 autonomous agent runs โ first-hand measurement, not independently verified (confidence: medium, cited: issue #4200).
- Manifest schema extensibility: The existing
_validate_providesfunction handlescommands,templates,scripts,config. A newinstructionskey requires schema validation, file-reference resolution, and install/uninstall hooks โ estimated medium scope (confidence: high, cited: codebase). - Per-agent routing complexity: The
agent-contextextension already maintains agent key โ context file mapping. Reusing this avoids reinventing routing but requires coordination between extension system andagent-contextlayer, or a simpler fallback via constitution.md (confidence: high, cited: codebase). - Merge-safety constraint: Multiple extensions may contribute instruction blocks simultaneously. The existing marker pattern must be extended to per-extension namespaced blocks (e.g.,
<!-- SPECKIT EXT:cosmos-db START -->). This convention does not yet exist (confidence: high, cited: codebase analysis).
Evidence Against the Idea
- Token overhead is real: Always-on instructions increase prompt size for every request regardless of relevance. May be resisted by users managing token budgets. [cited: issue #4200 (acknowledged by submitter) + general LLM cost considerations]
- Adds install-time complexity:
specify extension addmust now perform context-file writes with merge logic, ordering, and conflict handling โ increases blast radius of extension installs. [cited: codebase analysis] - Context file ownership is already complex: AGENTS.md custom instruction explicitly states "The Specify CLI carries no agent-context state whatsoever." A parallel mechanism in core
specify extension addrisks ownership fragmentation. [cited:AGENTS.mdcustom instruction] - A/B data is unverified: The +0.16 conformance improvement comes from the feature author's own measurements. [cited: issue #4200]
Gaps & Open Questions
- [NEEDS CLARIFICATION: Canonical routing target โ per-agent always-on files vs. constitution.md vs. both?]
- [NEEDS CLARIFICATION: Size cap value and enforcement mode (error vs. warning)?]
- [NEEDS CLARIFICATION: Ownership boundary โ core CLI vs.
agent-contextextension?] - [NEEDS CLARIFICATION: Ordering/precedence when multiple extensions contribute instruction blocks?]
- [NEEDS CLARIFICATION: Upgrade/replace semantics for
specify extension update?]
Sources
- https://github.com/github/spec-kit/issues/4200 (host: github.com, policy: allowlisted)
src/specify_cli/extensions/__init__.pyโ manifest validation code (codebase)extensions/agent-context/โ agent-context extension (codebase)extensions/agent-context/scripts/bash/update-agent-context.shโ marker-merge implementation (codebase)AGENTS.mdโ design constraint re: CLI context-file ownership (codebase)
Generated by ๐ก Assess a Feature Request by Installing and Running Spec Kit for issue #4200 ยท 478.7 AIC ยท โ 35.8 AIC ยท โ 36.5K ยท โท
Feature assessment โ extension-always-on-instructions ยท Stage 3/5: Problem
Problem Definition: Extension Always-On Instructions
- Slug: extension-always-on-instructions
- Created: 2026-08-19
- Inputs used: intake.md | research.md
Problem Statement
Extensions that deliver guidance through commands and hooks are effectively invisible to autonomous agents, which skip both โ leaving the extension's core value undelivered in the increasingly dominant agentic workflow mode. There is no mechanism for an extension to contribute guidance that is unconditionally present in the model's context from the start of every session.
Affected Users & Stakeholders
- Users (extension authors): Developers building domain-specific, security, IaC, or best-practice extensions whose guidance needs to be followed even when no command is ever invoked. Currently their extension has near-zero effect in autonomous runs.
- Users (extension consumers): Developers using Spec Kit in autonomous/agentic workflows who install an extension expecting its guidance to be active, but receive no benefit because the agent never invokes the extension's commands.
- Stakeholders (Spec Kit maintainers): The extension ecosystem's value proposition depends on extensions actually working in the primary use case. If extensions are silent in agentic runs, extension adoption is undermined.
- Stakeholders (enterprise/team leads): Teams deploying Spec Kit with security or compliance extensions need those rules reliably enforced, not conditionally invoked.
Goals
- Allow extensions to contribute a compact, always-on instruction block that is present in the agent's context from session start, without requiring the agent to invoke any command.
- Ensure the mechanism is merge-safe: multiple extension blocks coexist without clobbering each other or user-authored content.
- Ensure the mechanism is lifecycle-safe: install, update, and uninstall cleanly manage each extension's block.
- Work across supported agents, or document a clear no-op for unsupported ones.
Non-Goals
- Full replacement of commands and hooks โ those remain the delivery mechanism for structured, on-demand workflows.
- Arbitrary file writes by extensions outside the designated instruction block.
- Modifying extension behavior for IDE-invoked (non-autonomous) workflows where commands are already reachable.
- Auto-generating instructions from an extension's commands (extension authors author the instruction block explicitly).
Success Metrics
- Extension-provided instruction blocks are present in the agent context file (or constitution) after
specify extension add, verifiable by inspection (baseline: 0% of installed extensions contribute always-on context today). specify extension uninstallcleanly removes the extension's block without affecting adjacent content (baseline: uninstall removes command files only today).- (Qualitative) Extension authors confirm the feature addresses the agentic delivery gap they hit in practice.
- (Optional) Best-practice conformance scores for extensions that migrate key rules to
provides: instructions:improve over command-only delivery (baseline: +0.10 mean from commands per submitter's data).
Cost of Inaction
Extensions whose core value is best-practice guidance remain ineffective in autonomous agent runs. The extension ecosystem's credibility for the agentic use case is weakened; extension authors face a dead end that pushes them toward fragile workarounds (docs-only, mid-session file writes). The Azure Cosmos DB extension โ and any similar extension โ ships with a known gap that cannot be closed without this feature.
Open Questions
- [NEEDS CLARIFICATION: Should instructions be written to per-agent always-on files (via agent-context routing) or to constitution.md, or both?]
- [NEEDS CLARIFICATION: What is the acceptable size cap for an extension instruction block, and how should violations be surfaced?]
- [NEEDS CLARIFICATION: What is the correct ownership boundary โ core
specify extension add, theagent-contextextension, or a new bridge layer?] - [NEEDS CLARIFICATION: What ordering/precedence rules apply when multiple extensions each contribute instruction blocks?]
- [NEEDS CLARIFICATION: How should
specify extension updatehandle block replacement to avoid stale rules?]
Generated by ๐ก Assess a Feature Request by Installing and Running Spec Kit for issue #4200 ยท 478.7 AIC ยท โ 35.8 AIC ยท โ 36.5K ยท โท
Feature assessment โ extension-always-on-instructions ยท Stage 4/5: Concept
Concept: Extension Always-On Instructions
- Slug: extension-always-on-instructions
- Created: 2026-08-19
- Recommended option: Option A โ Manifest
provides: instructions:routed through agent-context
Options
Option A โ Manifest provides: instructions: with agent-context routing
- Sketch: Add
provides: instructions:to the extension manifest schema, listing one or more Markdown files whose content should be installed as always-on context.specify extension addreads the active integration, looks up the agent's canonical always-on file via the agent-context routing map, and writes each extension's instruction block inside a namespaced marker block (e.g.,<!-- SPECKIT EXT:cosmos-db START -->...<!-- SPECKIT EXT:cosmos-db END -->). Multiple extensions coexist via separate namespaced blocks.specify extension uninstallremoves only the extension's own block. If the active integration has no always-on file, falls back to constitution.md. - Appetite: medium (weeks) โ manifest schema change,
_validate_providesextension, install/uninstall context-file write logic, agent routing, size cap lint, tests. - Trade-offs:
- Wins: Most powerful delivery; works for all supported agents; fully lifecycle-safe; reuses existing routing infra.
- Sacrifices: Adds coupling between core extension install and agent-context logic; increases install complexity.
- Rabbit holes: Ownership boundary tension โ AGENTS.md custom instruction explicitly states "CLI carries no agent-context state whatsoever"; marker namespace collisions for short extension IDs; ordering guarantees with many extensions installed.
Option B โ Constitution.md-only delivery
- Sketch:
specify extension addappends the extension's instruction block to.specify/memory/constitution.mdusing namespaced markers. No per-agent routing; one canonical target regardless of integration. Agents that read the constitution receive the instructions unconditionally (requiresagent-contextextension to surface it, which it does for all current integrations). - Appetite: small (days) โ constitution is a project-local Markdown file; install/uninstall reduces to marker-aware file edit; no per-agent routing.
- Trade-offs:
- Wins: Simpler to implement; no per-agent routing; no coupling to
agent-contextinternals; constitution is always present. - Sacrifices: Relies on
agent-contextextension being installed to surface the constitution; one extra indirection vs. writing directly to the agent file.
- Wins: Simpler to implement; no per-agent routing; no coupling to
- Rabbit holes: Does every integration reliably surface constitution.md? Needs verification per integration.
Option C โ Do nothing / docs only
- Sketch: Document a recommended pattern for extension authors to manually include instructions in their README for users to copy into their context file. No CLI changes.
- Appetite: small (hours)
- Trade-offs:
- Wins: Zero implementation risk.
- Sacrifices: Proven not to solve the problem (manual, skippable, not portable, defeats the point of an extension ecosystem).
- Rabbit holes: None โ but no value delivered.
Recommendation
Option A is recommended: it directly addresses the problem at the right abstraction layer, reusing existing per-agent routing infra and marker-merge patterns. The routing map and merge logic already exist in the agent-context extension; the manifest extension pattern is established; the marker approach is proven.
Option B is the preferred fallback: if the ownership boundary question (AGENTS.md: "CLI carries no agent-context state") proves blocking for Option A, Option B delivers the core value with lower scope while still solving the problem for projects with agent-context installed.
The spec phase must resolve ownership first: (a) implement in core CLI with a narrow exception to the no-context-state rule for extension instruction blocks, or (b) implement as a new capability inside the agent-context extension triggered by an extension install event.
Out of Scope (for the recommended option)
- Auto-generation of instruction content from command files.
- Real-time / session-time injection (instructions installed at
specify extension addtime). - Agent-side enforcement of instruction compliance.
- Agents with no always-on file and no constitution fallback (documented no-op).
Assumptions to Validate
- The
agent-contextrouting map is accessible atspecify extension addtime. - Namespaced markers (
<!-- SPECKIT EXT:<id> START/END -->) are robust for all valid extension IDs. - Constitution.md is reliably surfaced to agents by all current integrations (Option B viability).
- A soft size cap (e.g., 2 KB per extension block) is acceptable to extension authors.
Generated by ๐ก Assess a Feature Request by Installing and Running Spec Kit for issue #4200 ยท 478.7 AIC ยท โ 35.8 AIC ยท โ 36.5K ยท โท
Feature assessment โ extension-always-on-instructions ยท Stage 5/5: Decision โ verdict go
Decision: Extension Always-On Instructions
- Slug: extension-always-on-instructions
- Decided: 2026-08-19
- Verdict: go
- Artifacts reviewed: intake.md | research.md | problem.md | concept.md
Scorecard
| Criterion | Rating | Justification |
|---|---|---|
| Problem validity | strong | The gap is real and mechanistically clear: commands and hooks are opt-in; autonomous agents skip both; extension guidance never reaches the model. The 0/30 invocation measurement is first-hand and internally consistent. |
| Evidence strength | adequate | Submitter provides direct measurement (0/30 invocations, A/B conformance +0.16 vs. +0.10) and a sound mechanistic argument. Data is unverified by a third party but is concrete and consistent with known agent behavior. Honest rating: adequate, not weak. |
| Value vs. inaction | strong | Inaction leaves domain/best-practice extensions ineffective in the primary agentic use case. The extension ecosystem's value proposition is directly undermined. |
| Feasibility / appetite | adequate | Building blocks exist: manifest schema extension pattern, agent-context marker-merge, constitution fallback. Option A is medium appetite; Option B is small. No novel infrastructure required. Ownership boundary is a design decision, not a feasibility blocker. |
| Strategic fit | strong | Aligns directly with Spec Kit's direction: extension ecosystem for agentic delivery; agent-context for always-on guidance; lifecycle-safe install/uninstall for all extension artifacts. The feature fills a gap the architecture creates. |
| Risk posture | adequate | Main risks (token cost, ownership boundary, marker collisions) are identified and credibly mitigated in the concept: size cap, namespaced markers, two clear implementation paths. No unmitigated surprises. |
Verdict & Rationale
Go. The problem is valid, evidence is adequate, a recommended concept option exists with a well-scoped fallback, and the feature fits squarely within Spec Kit's strategic direction. Evidence strength clears the adequate threshold required for a go verdict: the 0/30 invocation data and the A/B conformance numbers are first-hand and mechanistically sound, even if not independently replicated.
The key design question โ ownership boundary between core CLI and the agent-context extension โ is not a blocking unknown. It is a well-defined decision to be resolved in the spec phase, with two clear paths. Option B (constitution-only, small appetite) is a viable reduced-scope entry if Option A's boundary proves more complex than expected.
If go โ Handoff to /speckit.specify
- Problem: Extensions that rely on commands and hooks deliver zero guidance to autonomous agents that skip both; there is no mechanism to contribute always-on context that is present from session start.
- Chosen approach: Option A โ
provides: instructions:in extension manifest, installed as per-extension namespaced marker blocks in the agent's always-on file (via agent-context routing), with constitution.md as fallback. Option B (constitution-only) is the fallback scope if Option A ownership boundary proves blocking. - In scope: Manifest schema addition (
provides: instructions:); install-time write of instruction block to always-on target; uninstall/update lifecycle management; merge-safe namespaced markers; agent routing fallback to constitution.md; size cap lint; documentation updates. - Out of scope: Auto-generation from commands; session-time injection; agent-side enforcement; agents with no always-on file and no constitution fallback.
- Success metrics: Instruction block present in agent context file after
specify extension add; cleanly removed byspecify extension uninstall; no regressions in existing extension install/uninstall tests. - Carried-forward open questions:
- [NEEDS CLARIFICATION: Ownership โ implement in core CLI or inside
agent-contextextension? Resolve before spec begins.] - [NEEDS CLARIFICATION: Size cap value and enforcement mode (error vs. warning).]
- [NEEDS CLARIFICATION: Ordering/precedence when multiple extensions contribute blocks.]
- [NEEDS CLARIFICATION: Upgrade/replace semantics for
specify extension update.] - [NEEDS CLARIFICATION: No-op behavior for agents with no always-on file and no constitution โ error, warning, or silent skip?]
- [NEEDS CLARIFICATION: Ownership โ implement in core CLI or inside
Generated by ๐ก Assess a Feature Request by Installing and Running Spec Kit for issue #4200 ยท 478.7 AIC ยท โ 35.8 AIC ยท โ 36.5K ยท โท
Before adding a new provides: instructions: capability, it's worth checking whether existing primitives already cover this. Two to read up on:
- Workflows โ deterministic
command/promptsteps and overlays, which run regardless of what the agent chooses: https://github.github.io/spec-kit/reference/workflows.html - Presets โ can override core and extension commands/scripts (
wrap/replace): https://github.github.io/spec-kit/reference/presets.html
Please let us know if that's sufficient for your use case, and if not, why not.
Posted with AI assistance (GitHub Copilot) on behalf of @mnriem.
I would like to explore a contribution for this issue. Iโll first compare the existing Workflows and Presets primitives with the proposed always-on instruction blocks, then report whether they fully cover the use case or identify the smallest missing capability. If a maintainer confirms the gap and preferred ownership boundary, could this issue be assigned to me for implementation?
Disclosure: I used ChatGPT to review the repository guidance and draft this comment.
@TheovanKraay I applied feature-needs-clarification label pending your investigation
Before adding a new
provides: instructions:capability, it's worth checking whether existing primitives already cover this. Two to read up on:
- Workflows โ deterministic
command/promptsteps and overlays, which run regardless of what the agent chooses: https://github.github.io/spec-kit/reference/workflows.html- Presets โ can override core and extension commands/scripts (
wrap/replace): https://github.github.io/spec-kit/reference/presets.htmlPlease let us know if that's sufficient for your use case, and if not, why not.
Posted with AI assistance (GitHub Copilot) on behalf of @mnriem.
Thanks @mnriem, I dug into both. I think they're solving nearby problems rather than this one, but there's a piece I'd rather just measure than argue about.
Quick context on why this matters: in autonomous runs the extension's own commands got invoked 0 out of 30 times and the hooks fired 0 times, so none of its guidance ever reached the model. When we delivered the same rules always-on instead, conformance went up +0.16 mean vs +0.10 as commands, and it helped in every cell we tested. The content was the same either way, so this really is about delivery, not content.
Looking at the code, neither Workflows nor Presets quite closes that. Neither one is something an extension ships via specify extension add (you install and turn them on separately), and neither writes into the agent's always-on file (copilot-instructions.md, AGENTS.md, constitution.md), so nothing's there at the start of a session. They both only kick in once something gets invoked.
Presets are the one I'm not sure about. A preset can wrap/prepend the base speckit.plan / speckit.implement templates, so in a driven flow where the agent does run those commands, the rules would land in front of the model at that point. I haven't actually A/B tested that, so I don't want to say it doesn't work....
So I'll just test it. Same rule block, three ways: (a) nothing, (b) always-on, (c) preset-wrapped into the base commands, scored on the same conformance metric, run in both a driven flow and a hands-off flow. If (c) keeps up with (b) everywhere, then Presets basically cover this and the feature isn't needed. If (c) sags toward (a) in the hands-off case, that's the gap this issue is about. I'll come back with the numbers.
Separately, the assessment bot pointed out that the agent-context extension already does the marker-merge into the agent files. Assuming the A/B I'm about to run backs up the gap, I'm happy to build a poc that plugs extension-provided rules into that. The main thing I'd need from you is where you'd want this to live, in the core CLI on specify extension add, or inside agent-context itself?
Thanks for running the comparison. I checked the current community catalogs, and there is useful prior art, but I do not see an entry that fully provides extension add -> agent-native always-on instructions -> update/uninstall cleanup today:
- Repository Governance is the closest extension implementation. It resolves the active integration's context file and marker-merges a generated governance projection into it. However, generation still happens through its command or optional
after_constitution/after_plan/after_taskshooks; installation alone does not project the instructions. - Memory MD ships agent-file templates and its init command injects a pointer into existing agent files. That also requires invoking
/speckit.memory-md.init; itsprovides.agent_templatesdeclaration is not currently a capability consumed by Spec Kit core. - Security Governance and Agent Parity Governance ship standalone agent-guidance addenda and wrap core commands, but preset installation does not copy those addenda into
AGENTS.md,CLAUDE.md, or Copilot instructions. Other presets such as Sicario Core alter the constitution/template flow, not session-start agent context.
So I agree there is a reachability gap if the required contract is automatic delivery from extension installation. Those projects demonstrate the content and merge patterns, but not that complete lifecycle.
One important correction to the premise: agent instruction files do not inherently force an LLM more than the same text delivered through an invoked command or preset. Providers describe these files as loaded context/instructions, not enforcement; Claude's documentation says this explicitly. Their advantage is automatic inclusion, scope, and persistence. An immediate task prompt can be equally or more salient and generally remains higher authority when there is a conflict.
That means the hands-off arm of the proposed A/B primarily measures whether the rules reached the model, not whether agent files have greater instruction strength: if the wrapped command is never invoked, preset-wrapped is effectively the control. To isolate delivery from weighting, please also compare always-on against the same rule block in a command that the harness deterministically invokes, and record whether each payload was actually present in the model request.
For ownership, I would keep agent-file mutation in the opt-in agent-context extension rather than reintroducing it into the core CLI. Core could recognize/validate extension instruction metadata, while agent-context composes enabled extensions' blocks and owns routing, markers, refresh, update, and removal. Without agent-context, installing an extension should continue not to mutate agent files.
Posted on behalf of @mnriem by GitHub Copilot (model: GPT-5.6 Sol).
Thanks @mnriem, this is really helpful, seems like we are converging. I ran the pre-check: same rule block, four conditions, same conformance metric, across 2 models x 4 languages x 3 complexity (n=24). A = bare, B = always-on, C = rules wrapped into a base command that actually gets invoked, D = same preset when the command is never invoked. A 0.843, B 0.986, C 0.989, D 0.831. The one that matters, C - B, is +0.003. I also logged whether the payload was in the request: present for B and C, absent for D.
Fair point too, and I'm not arguing that always-on files get obeyed any harder than the same text in a command. B and C landing on top of each other is the whole point: when the same rules are actually present, always-on vs an invoked command makes no difference. So it's not about how strongly the model follows it, it's just about reachability, whether the rules are in the request at all. That's why D falls back to bare. So the pre-check is the isolation test you asked for, and it says there's no obedience advantage, only present vs absent.
The only thing left is behavioural: in a real hands-off run, does the agent actually invoke that wrapped command? Our earlier 0/30 (and 0 hook fires) says usually not, and when it doesn't, preset-wrapped is just the control. I can confirm that in the real runtime if you want the datapoint, but given your catalog review already found nothing that does automatic-on-install delivery, it feels like overkill?
On ownership, that works for me: keep the agent-file writes in the opt-in agent-context extension, core just validates the metadata, and nothing touches agent files if agent-context isn't installed. On that basis I'm happy to prototype it, core recognises provides: instructions: and agent-context composes the enabled extensions' blocks and owns routing, markers, refresh, update, and removal. I'll sketch it against agent-context and share.
This issue has been automatically marked as stale because it has had no activity for 60 days. It will be closed in 30 days unless there is a substantive update. If the problem still applies, please provide updated context such as whether it is still reproducible, the affected version or environment, its current impact, and any new reproduction details. A comment that only states that the issue is "still relevant" does not give maintainers enough information to reconsider it.