{{ message }}
fix(tasks): require field constraints from data-model.md in generated tasks - #4430
Open
chelsealong wants to merge 2 commits into
Open
fix(tasks): require field constraints from data-model.md in generated tasks#4430chelsealong wants to merge 2 commits into
chelsealong wants to merge 2 commits into
Conversation
… tasks /speckit.tasks mapped data-model.md entities to user stories but never told the agent to carry field-level constraints (max length, nullable, enum values, validation rules) into the task text. Left to discretion, the implementing agent can silently invent its own value instead of the one recorded in data-model.md. Fixes github#4383
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The regression assertion is too broad to reliably detect removal of the required behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates /speckit.tasks to preserve field-level data-model constraints in generated task descriptions.
Changes:
- Requires constraints to be quoted verbatim.
- Adds a regression test for the prompt rule.
File summaries
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…m wording Addresses Copilot review feedback that the prior assertion only checked for the word 'constraint', so it would still pass if the rule's meaning were reversed (e.g. constraints permitted to be omitted).
Contributor
Author
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.

Fixes #4383
Problem
/speckit.tasksmapsdata-model.mdentities to user stories (templates/commands/tasks.md, "From Data Model" section) but never instructed the agent to carry field-level constraints (max length, nullable/required, enum values, validation rules) into the generated task text. Left to the agent's discretion, a constraint present indata-model.mdcan be silently dropped fromtasks.md, and the implementing agent then invents its own value (e.g. the reporter'sdata-model.mdsaidSuspendReason nvarchar(200)but the generated code usedSuspendReasonMaxLength = 500becausetasks.mdnever repeated the200constraint for that field).Fix
Added one bullet to the "From Data Model" task-organization rule in
templates/commands/tasks.mdrequiring that field constraints fromdata-model.mdbe quoted verbatim in the corresponding task description, so the value isn't left to implementation-time discretion.This is a prompt-only change — no Python code, no breaking changes.
Testing
Added
tests/test_tasks_template_constraints.py, which asserts the "From Data Model" section oftemplates/commands/tasks.mdmentions carrying constraints forward.Verified the test fails without the fix and passes with it:
Full suite:
The 10 failures are pre-existing and unrelated to this change — they are all
*_python_paritytests exercising the "composed" preset variant (test_check_prerequisites_python_parity.py,test_create_new_feature_python_parity.py,test_resolve_template_python_parity.py,test_setup_plan_python_parity.py,test_setup_tasks_python_parity.py). I confirmed the identical 10 tests fail on a clean checkout ofupstream/mainwith no changes applied, in this sandbox (likely missing an environment prerequisite for the composed-preset fixtures, e.g. PowerShell). All tests in the affected files pass individually in isolation.AI Disclosure
I did use AI assistance (Claude, via Claude Code) to investigate the issue, write the template change, and write/verify the regression test.