Agents implement and approve changes without checking what the changed thing is for

Open
#2,032 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
cli

Research direction

Read the root AGENTS.md, the cli-view spec Purpose, and the existing /code-review and Codex review prompts, then review #2030 and PR #2031. Define where the situational check belongs and what evidence it must require; done means an agreed approach with coverage for the failure mode without changing unrelated agent guidance.

Written by the indexing model from the issue text.

Description

The problem, in one or two sentences

Agents build and approve requests without first asking what the thing they're changing is for and who uses it. #399 added every archived change to openspec view, a dashboard people read in a terminal, and the agents that wrote it and the agents that reviewed it all approved it. Projects with hundreds of archived changes lost their active work off the screen (#2030).

Who this affects

Maintainers and contributors who use coding agents to implement issues and review PRs. Indirectly, every user, because these changes ship.

What you tried

While fixing #2030 (PR #2031), we tried several places for a guardrail and dropped each one:

  • CONTRIBUTING section, spec requirement, code comment. Each restated this one bug instead of the general mistake. Adding a rule for every incident doesn't scale.
  • A principle in the root AGENTS.md ("work out who a thing is for before you change it"). Both Claude Code and Codex load that file in every session. Research suggests always-on principles like this cost more than they help:
    • Evaluating AGENTS.md (arXiv 2602.11988): context files raised inference cost by more than 20% with no general gain in success rate.
    • Anthropic's CLAUDE.md guidance says to leave out self-evident practices and to put situational guidance in skills.
    • Every agent already believes it checks the purpose of what it changes, so the line would add overhead to every task without catching the next case.

What #2031 keeps is a regression test: view output must not change when archived changes are added. That guards this bug, not the category.

What you have in mind

Open questions to discuss:

  1. Where should the check run? It matters at two moments: when an agent picks up an issue, and when an agent reviews a PR. A skill that loads only for those tasks is one option. Others are the PR template, review bot instructions (CodeRabbit), or the /code-review and Codex review prompts we already run.
  2. What should the check ask? It has to be concrete enough to verify. For example: name the command's audience (people, or agents and scripts), and check the change against a long-lived project, not just a fresh fixture.
  3. Do we record each command's audience somewhere? The cli-view spec Purpose already said the dashboard was for developers, and nobody acted on it. Writing more of that down may not help unless something reads it at the right moment.
  4. Should it cover docs and other files too? The same mistake showed up while fixing #2030: internal rationale went into the user-facing CLI reference.
Dominant language
TypeScript
Stars
76k
Forks
5.2k
Avg merge
1d 5h
Merged PRs (30d)
58

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Fission-AI/OpenSpec

All issues in Fission-AI/OpenSpec

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.