Skip to content

feat(tasks): cite canonical field constraints and analyze drift - #5458

Merged
mnriem merged 1 commit into
github:mainfrom
mnriem:mnriem-spec-kit-initialization
Nov 17, 2026
Merged

mnriem merged 1 commit into
github:mainfrom
mnriem:mnriem-spec-kit-initialization

Conversation

@mnriem

@mnriem mnriem commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Description

Closes #5429.

Implements the approved citation-first constraints assessment.

Generated tasks explicitly cite constrained fields as data-model.md Entity.field instead of restating unchanged constraints. Task self-sufficiency is defined relative to the feature's design documents; only compatible task-specific additions or narrowings are stated in task prose.

Analysis optionally loads the canonical data model, reports missing or unresolved field citations and contradictory task constraints, and shows field-level coverage without changing requirement coverage semantics. Citation-only tasks and matching prose in existing tasks remain valid analysis inputs.

Updates the prompt scaffold regressions and adds reusable positive/negative fixtures. No analyzer runtime, dependency, implementation-command behavior, or historical-artifact migration changes are included. Scaffolded SKILL.md files and local feature artifacts are excluded.

Testing

Set up this checkout's .venv and editable install using the local development guide. Run commands from the checkout root.

  • Tested locally with .venv/bin/specify --help (Windows PowerShell: .\.venv\Scripts\specify.exe --help)
  • Ran relevant existing tests with .venv/bin/python -m pytest tests -q (Windows PowerShell: .\.venv\Scripts\python.exe -m pytest tests -q); use affected test paths for focused checks and LC_ALL=en_US.UTF-8 on macOS
  • Tested with a sample project (if applicable)

Commands and results:

  • .venv/bin/specify --help — passed.
  • LC_ALL=en_US.UTF-8 .venv/bin/python -m pytest tests/integrations/test_integration_copilot.py tests/integrations/test_integration_base_skills.py tests/test_setup_tasks.py tests/test_tasks_template_constraints.py tests/test_command_template_hooks.py tests/test_command_template_py_scripts.py tests/test_converge_template_scaffold.py -q — 242 passed, 27 existing platform/tool-dependent skips.
  • .venv/bin/python -m pytest --collect-only -q — 16840 collected, versus 16834 before this change.
  • git diff --check — passed.
  • .venv/bin/specify init <sample-project> --integration copilot --integration-options="--skills" --script sh --ignore-agent-tools --non-interactive — passed; inspected and exercised the rendered tasks/analyze guidance through GitHub Copilot (GPT-6.1 Sol) on macOS.

Updated scaffold assertions failed against the original prompts and passed after the change. Sample-project exercises cover citation-only generation, task-specific narrowing, and the positive/negative analysis fixtures. These are current-agent evaluations with expectations visible, not independent or deterministic LLM tests; pytest checks prompt scaffolding rather than executing an LLM. The full pytest suite was not run.

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (fill in the disclosure below)

AI disclosure: Authored with GitHub Copilot using GPT-6.1 Sol in autonomous agent execution under user direction. Assistance covered specification/planning, command-template changes, fixtures, automated scaffold tests, current-agent sample-project evaluations, and this PR description. No independent human line-by-line review or manual human execution of the scenarios is claimed.

Implement the citation-first constraint guidance approved for github#5429. Keep unchanged constraints in data-model.md, add field-citation and contradiction checks to analysis, and cover the shipped prompts with regression fixtures and scaffold tests.

Assisted-by: GitHub Copilot (model: GPT-6.1 Sol, autonomous)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI adaptive review requested due to automatic review settings November 17, 2026 00:21

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.

🔵 Needs a closer look

Coupled changes to constraint inheritance, task-specific narrowing, and citation resolution require cross-command semantic review beyond the supplied scaffold assertions.

No open issues 🎉

What changed in this PR

Addresses #5429 by making task guidance cite canonical field constraints in data-model.md rather than duplicate them, and extending analysis guidance to detect missing citations and constraint drift.

Changes:

  • Require explicit Entity.field citations, with prose reserved for compatible task-specific additions or narrowings.
  • Add optional data-model analysis and field-level coverage without changing requirement coverage semantics.
  • Expand prompt-scaffold regressions and agent-executed fixtures; automated checks validate instructions, not LLM behavior.
File Description
tests/​test_tasks_template_constraints.py Checks citation, consistency, coverage, and read-only prompt guidance.
tests/​fixtures/​constrained-fields.md Adds generation scenarios and positive/negative analysis fixtures.
templates/​commands/​tasks.md Replaces copied constraints with canonical citations and completeness checks.
templates/​commands/​analyze.md Adds optional field inventory, citation checks, and constraint-drift reporting.

Review effort: Balanced (adaptive)

@mnriem mnriem added the triage-can-wait Verdict: valid and in-scope but deprioritized; held behind the evidence gate label Nov 17, 2026
@mnriem
mnriem merged commit aafd34f into github:main Nov 17, 2026
14 checks passed
@mnriem
mnriem deleted the mnriem-spec-kit-initialization branch November 17, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage-can-wait Verdict: valid and in-scope but deprioritized; held behind the evidence gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: /speckit.tasks — cite data-model constraints instead of copying them verbatim

2 participants