Repository navigation
feat(tasks): cite canonical field constraints and analyze drift - #5458
Merged
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
🔵 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.fieldcitations, 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)
This was referenced Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #5429.
Implements the approved citation-first constraints assessment.
Generated tasks explicitly cite constrained fields as
data-model.mdEntity.fieldinstead 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.mdfiles and local feature artifacts are excluded.Testing
Set up this checkout's
.venvand editable install using the local development guide. Run commands from the checkout root..venv/bin/specify --help(Windows PowerShell:.\.venv\Scripts\specify.exe --help).venv/bin/python -m pytest tests -q(Windows PowerShell:.\.venv\Scripts\python.exe -m pytest tests -q); use affected test paths for focused checks andLC_ALL=en_US.UTF-8on macOSCommands 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
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.