Skip to content

feat: add /speckit-delta β€” constitution-driven vision-gap analysis#2947

Open
jzhao401 wants to merge 1 commit into
github:mainfrom
jzhao401:feat/delta-vision-gap
Open

feat: add /speckit-delta β€” constitution-driven vision-gap analysis#2947
jzhao401 wants to merge 1 commit into
github:mainfrom
jzhao401:feat/delta-vision-gap

Conversation

@jzhao401

Copy link
Copy Markdown

What this adds

Spec Kit's loop today covers the life of a single feature β€” specify β†’ clarify β†’ plan β†’ tasks β†’ implement. The decision which feature to build next lives outside the toolkit. This PR closes that loop with a new core command:

/speckit-delta reads the constitution's Vision & Direction section, inspects the current repo state (code + merged specs), computes the gap between the two, and recommends the next feature β€” with a handoff straight into /speckit-specify.

Concretely:

  • templates/commands/delta.md β€” the command template (200 lines; registers across integrations like every core command).
  • templates/constitution-template.md β€” adds a Vision & Direction section (North Star, Target Users & Value, Long-Term Objectives, Non-Goals). Long-Term Objectives are required to be observable β€” phrased so progress can be assessed by inspecting repo state β€” which is what makes the gap computation meaningful.
  • templates/plan-template.md β€” adds a Vision Alignment Check gate next to the existing Constitution Check, so each plan is validated against where the project is going, not only against its principles.
  • templates/commands/constitution.md β€” instructs the constitution command to populate Vision (inferring from README/docs when user input is silent; TODO(VISION) markers instead of bare placeholders).
  • One-line registrations (SKILL_DESCRIPTIONS, _FALLBACK_CORE_COMMAND_NAMES, claude ARGUMENT_HINTS) plus tests/test_delta_and_vision.py (14 tests) and expected-file inventory updates in the integration suites.

Why in core rather than a preset

The command is fully generic β€” it contains no org-specific content and works for any project whose constitution states a vision. We've been running it in production across our repos (currently distributed as a preset command) and the loop-closing step has proven to be the part of spec-driven development the core pipeline doesn't yet cover. Upstreaming makes it available at bare specify init.

Backward compatibility

Purely additive. Existing projects see no change until they regenerate their constitution; projects without a Vision section get inference + TODO(VISION) guidance rather than failures.

Testing

tests/test_delta_and_vision.py (14 new tests) plus the full touched suites β€” extensions, CLI, claude/copilot/generic and base integration suites β€” pass locally on top of current main (485 tests across the touched files).

Closes the loop between a project's constitution and its feature pipeline.
/speckit-delta reads the constitution's Vision & Direction section (North
Star, Target Users & Value, Long-Term Objectives, Non-Goals), inspects the
current repo state (code + specs), and recommends the next feature with a
handoff into /speckit-specify.

Included:
- templates/commands/delta.md β€” the command (registers across integrations)
- templates/constitution-template.md β€” adds the Vision & Direction section
  the command depends on
- templates/plan-template.md β€” adds a Vision Alignment Check gate so plans
  are checked against the Vision, not just the principles
- templates/commands/constitution.md β€” guidance for populating Vision
  (infer from README/docs when absent; TODO(VISION) markers, never bare
  placeholders)
- one-line registrations (SKILL_DESCRIPTIONS, _FALLBACK_CORE_COMMAND_NAMES,
  claude ARGUMENT_HINTS) + tests/test_delta_and_vision.py + expected-file
  inventory updates

All additions are backward-compatible: existing projects are unaffected
until they regenerate their constitution.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jzhao401 jzhao401 requested a review from mnriem as a code owner June 12, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant