Skip to content

fix(tasks): require executable commands for governed operations in task bodies#2264

Open
ayeshakhalid192007-dev wants to merge 4 commits intogithub:mainfrom
ayeshakhalid192007-dev:fix/tasks-embed-governed-commands
Open

fix(tasks): require executable commands for governed operations in task bodies#2264
ayeshakhalid192007-dev wants to merge 4 commits intogithub:mainfrom
ayeshakhalid192007-dev:fix/tasks-embed-governed-commands

Conversation

@ayeshakhalid192007-dev
Copy link
Copy Markdown

Fixes #2219

Description

Tasks generated by /speckit.tasks describe governed operations in prose.
When the constitution is compacted out of context, the agent guesses the
command, gets flags wrong, and the operation fails (e.g. 403 on NuGet push).

Root Cause

Task Generation Rules had no requirement to embed the exact command for
operations the constitution defines with specific syntax, flags, or env vars.
Tasks are always in agent context — prose descriptions throw that away.

Solution

Require that any task covering a governed operation includes the exact
executable command, parameterized with env var names, directly in the task body.

Changes

  • templates/commands/tasks.md — new ### Governed Operations (REQUIRED) rule + examples
  • templates/tasks-template.md — governed-command bullet added to Format legend
  • templates/commands/taskstoissues.md, tests/hooks/TESTING.md,
    workflows/ARCHITECTURE.md, workflows/README.md — pre-existing MD031/MD032/MD040 lint fixes

Why This Is Safe

Pure documentation change — no Python code, no CLI arguments, no new files.
Adds an instruction to an existing rule section; all existing task formats remain valid.

Testing

  • Run /speckit.tasks on a project with a governed push/deploy in the constitution — verify generated task body contains the exact command
  • ruff check src/ passes
  • markdownlint on changed files: 0 errors

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.

[Bug]: Agent loses constitution context mid-execution and falls back to guessing

1 participant