enhance(new-milestone): research prompt reads as external-only, so agents skip it for changes to existing code
Pre-submission checklist
- This improves existing behavior — it does not add a new command, workflow, or concept
- I searched existing issues (queries:
new-milestone research,skip research refactor,brownfield research,researcher codebase not external,research domain ecosystem new features,research existing code refactor); no matching proposal found - I have read CONTRIBUTING.md and will wait for
approved-enhancementbefore writing any code - I can describe the concrete benefit (below)
What existing feature or behavior does this improve?
The research decision step of gsd-core/workflows/new-milestone.md (Step 8, "Research Decision"): the wording of the AskUserQuestion prompt and its option descriptions.
Current behavior
Step 8 asks:
Research the domain ecosystem for new features before defining requirements?
- "Research first (Recommended)" — Discover patterns, features, architecture for NEW capabilities
- "Skip research for this milestone" — Go straight to requirements
The prompt and the option text frame research as a survey of the external domain for new capabilities. The spawned researchers are broader than that: the Architecture and Pitfalls dimensions are told to cover "how [target features] integrate with existing architecture" and "common mistakes when adding [target features] to existing system". For a milestone that changes existing code (a move, rename, cleanup, refactor, path migration) there is nothing external to research, and an agent reading the prompt literally concludes that research is useless. The work most in need of research in that case — inventorying what the existing code couples to, and what breaks when it moves — is the part the wording hides.
Observed by the reporter repeatedly across sessions (not a single occurrence): for milestones that touch existing code rather than add features, the agent recommends skipping research, and even reorders the options so that "Skip" carries the "(Recommended)" mark, although the workflow marks "Research first" as recommended when research_enabled is true. The agent's own explanation when challenged: it read "research" as "study external libraries and patterns for new features", which is what the prompt says.
Also: the workflow prescribes exactly four researchers (Stack, Features, Architecture, Pitfalls). For a change to existing code, Stack and Features are typically empty; nothing in the workflow says a narrower set is allowed, so an agent either runs four (two of them padding) or deviates silently.
Proposed behavior
Reword the Step 8 prompt and options so the scope is explicit, e.g.:
Research before defining requirements? (covers the existing codebase too: what the change couples to, what can break, how it integrates — not only external libraries and patterns)
- "Research first (Recommended)" — Discover patterns and features for NEW capabilities, and map integration points and pitfalls in the EXISTING code
- "Skip research for this milestone" — Go straight to requirements
State in the step that the "(Recommended)" mark is determined by
research_enabledfrom config and is not to be reassigned by the orchestrator's own judgement of the task; the choice stays with the user.State that the orchestrator may run a subset of the four dimensions (e.g. Architecture + Pitfalls only) when the others are plainly empty for the milestone, and that it tells the user which dimensions it dropped and why. The synthesizer's
required_readinglist then names only the files that exist.
Reason and benefit
Why the current behavior is a problem: the prompt narrows what the step actually does, so for brownfield-change milestones the agent (and a user reading only the prompt) skips the one step that surfaces hidden coupling before requirements are written. The cost of the skipped inventory shows up later as requirements that miss consumers of the old paths. The silent reordering of "(Recommended)" and the silent drop of dimensions are separate deviations that make the workflow's behavior unpredictable.
Concrete benefit: the decision is made on an accurate description of what research covers; the recommended option stays consistent with config; changes to existing code get a proportionate research pass (two dimensions instead of either four or none) with the deviation visible to the user.
Scope of changes
Files modified:
gsd-core/workflows/new-milestone.md— Step 8 wording, recommendation rule, subset-of-dimensions rule, synthesizerrequired_readingwording
Possible follow-up (not verified by the reporter): the same phrasing may exist in the research prompts of other workflows (new-project, plan-phase); the reporter read only new-milestone.md.
No new files, commands, or dependencies.
Breaking changes
None expected: the option labels and their meaning stay the same, only the descriptive text and two orchestration rules are clarified. If any test snapshots the literal Step 8 prompt text, it would need updating.
Alternatives considered
- Leave the text and rely on agents to read the Architecture/Pitfalls researcher templates: does not work when the decision is made before any researcher is spawned, which is exactly where the error happens.
- Add a
research_scopeconfig key (external/codebase/both): heavier, adds a concept; a wording fix addresses the observed failure. - Always run research and drop the question: removes user control over the cost of four subagents.
Area affected
Core workflow (init, plan, build, verify)
Additional context
Reproduction: run /gsd-new-milestone with a milestone that only moves or cleans existing files (e.g. "move tests into the bundle directory and clean paths/comments"), research_enabled: true. Observe which option the agent marks as recommended and how it justifies skipping.
Source: open-gsd/gsd-core