Skip to content

fix(templates): guard constitution command scope#3616

Draft
BenBtg wants to merge 3 commits into
mainfrom
fix/896-constitution-scope-guard
Draft

fix(templates): guard constitution command scope#3616
BenBtg wants to merge 3 commits into
mainfrom
fix/896-constitution-scope-guard

Conversation

@BenBtg

@BenBtg BenBtg commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description

The constitution command could interpret mixed governance and implementation requests as permission to modify application artifacts. This adds an explicit governance-only scope guard, preserves out-of-scope intent as suggested follow-up commands, and renders those suggestions using each skills integration's native $speckit-* invocation syntax.

Closes #896

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv sync && uv run pytest
  • Tested with a sample project (if applicable)
  • Ran .venv/bin/python -m pytest tests/integrations/test_integration_generic.py -q

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

This change and PR were authored autonomously on behalf of @BenBtg by GitHub Copilot (model: GPT-5.6 Sol).

Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 02f9e138-da58-4a60-93b9-eae659d2aa19
Copilot AI review requested due to automatic review settings July 21, 2026 17:37
@BenBtg
BenBtg requested a review from mnriem as a code owner July 21, 2026 17:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds governance-only scope safeguards to the constitution command.

Changes:

  • Defers implementation requests to suggested follow-up commands.
  • Adds regression coverage for the rendered guard.
Show a summary per file
File Description
templates/commands/constitution.md Adds scope and follow-up guidance.
tests/integrations/test_integration_generic.py Verifies rendered guard content.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread templates/commands/constitution.md
Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 02f9e138-da58-4a60-93b9-eae659d2aa19
Copilot AI review requested due to automatic review settings July 21, 2026 17:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread src/specify_cli/integrations/base.py
Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 02f9e138-da58-4a60-93b9-eae659d2aa19
Copilot AI review requested due to automatic review settings July 21, 2026 17:48
@BenBtg
BenBtg marked this pull request as draft July 21, 2026 17:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

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.

Constitution command: scope ambiguity allows unintended feature execution; add explicit guard

2 participants