Skip to content

docs(agents): an agent that finds an item cannot be built as specified stops and returns it to refinement with evidence, instead of adding code #1348

Closed

Description

@dan-petty

Problem

The owner, 2026-10-07: "my main challenge has been with agentic coders that always add code to a problem instead of identifying that an issue cannot be implemented as specified or needs a refactor."

v0.2.28 shows the pattern:

AGENTS.md tells agents to implement items test-first, but it has no step for checking the item's premise, and no way to hand an item back.

Acceptance criteria

  • AGENTS.md (and the generator, if it carries the workflow) adds a feasibility check before any code: confirm the item's premise against the real system (upstream docs, library source, the cluster), and say in the task file how it was checked.

  • When an item cannot be built as specified, or needs a refactor beyond its scope, the agent writes no compensating code:

    • it comments on the issue with the evidence and a proposed re-scope or refactor item;
    • it returns the item to New, so refinement picks it up;
    • it stops.

    devops roadmap (or a documented devops gh command) does the comment and the status change in one step, and supports --dry-run.

  • AGENTS.md lists the signals to stop rather than add code:

    • swallowing an error;
    • product code that detects tests;
    • a second fix on top of a fix in the same area within one release;
    • a review loop that keeps finding new defects in the same feature.
  • The task-file template gets a "Feasibility" line, and tests/test_agent_task_files.py requires it on new task files.

  • changelog.d/<n>.md records the change; CHANGELOG.md and docs/ROADMAP.md are not edited.

  • uv run devops ci passes.

Key questions

  • Return to New, or a dedicated label? (proposed) Return to New with the evidence comment, so refinement's existing flow handles it. needs-split stays for items that are only too big.

Strategic alignment

Activity

  1. added
    type/docs
    priority/p1-high
    scope/agent
    on Oct 7, 2026
  2. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Priority: P2-Medium. It addresses a recurring workflow failure (agents stacking compensating code on infeasible items) but is a process improvement, not a blocking defect.
    • Effort: Medium. Requires editing AGENTS.md, adding a devops sub-command with --dry-run, updating the task-file template, adding a test assertion, and a changelog entry across several files.
  3. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Linked: #879 and #1303. All three change tests/test_agent_task_files.py, and #879 trims the template this item extends. Found by the 2026-10-08 backlog review.

  4. added this to the v0.2.33 milestone on Oct 9, 2026
  5. dan-petty-bot commented on Oct 9, 2026

    @dan-petty-bot
    Collaborator

    Admitted to v0.2.33: an open or merged pull request is in flight for it. (devops roadmap reprioritize)

  6. dan-petty-bot commented on Oct 9, 2026

    @dan-petty-bot
    Collaborator

    What changed

    #1518, merged into release/v0.2.33 as 56c431b.

    Closes #1348

    16 file(s) changed.

    How it was verified

    Check runs at 295063f:

    • Prune PR DevContainer Images: pass
    • CodeQL: pass
    • DevContainer Image: skipping
    • Static Analysis: pass
    • Analyze (actions): pass
    • Analyze (python): pass
    • Tests & Coverage: pass
    • Changed-Test Independence: pass
    • Service Image: skipping
    • Dependency Freshness: skipping

    Acceptance Criteria of docs/agent/tasks/task-1348-agent-feasibility-stop.md:

    • AGENTS.md and instruction generator add a feasibility check before any code: confirm premise against real system, and say in the task file how it was checked.
    • When an item cannot be built as specified, the agent writes no compensating code, comments on the issue with evidence, returns the item to New (devops roadmap return --comment "<evidence>" --confirm, which supports --dry-run), and stops.
    • AGENTS.md lists the four signals to stop rather than add code: swallowing an error, product code that detects tests, a second fix on top of a fix in the same area within one release, and a review loop that keeps finding new defects in the same feature.
    • The task-file template gets a "Feasibility" line, and tests/test_agent_task_files.py requires it on new task files.
    • changelog.d/1348.md records the change; CHANGELOG.md and docs/ROADMAP.md are not edited.
    • uv run devops ci passes.
  7. added a commit that references this issue on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/agenttype/docs

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions