Skip to content

fix: read codebase conventions during new-project for brownfield projects#935

Open
amanape wants to merge 2 commits intogsd-build:mainfrom
amanape:fix/new-project-read-codebase-maps
Open

fix: read codebase conventions during new-project for brownfield projects#935
amanape wants to merge 2 commits intogsd-build:mainfrom
amanape:fix/new-project-read-codebase-maps

Conversation

@amanape
Copy link
Contributor

@amanape amanape commented Mar 4, 2026

What

Read .planning/codebase/CONVENTIONS.md during /gsd:new-project questioning (Step 3) and PROJECT.md creation (Step 4) for brownfield projects.

Why

Brownfield projects have conventions already documented but new-project never reads them — leading to redundant questions (e.g., "where should modules live?" when conventions already specify /lib).

Details

  • Step 3: When has_codebase_map is true, read CONVENTIONS.md before opening the conversation
  • Step 4: Expand brownfield file reads to include CONVENTIONS.md alongside ARCHITECTURE.md and STACK.md
  • Conditional on has_codebase_map — zero cost for greenfield projects

Pros: Fixes the root cause at the earliest decision point. Prevents redundant questions.
Cons: Adds context to orchestrator window during questioning. Only helps if /gsd:map-codebase was run first (expected brownfield flow).

Related: #936 (planner agent), #937 (phase prompt template) — together these ensure CONVENTIONS.md flows through questioning → planning → execution.

Testing

  • Tested on macOS
  • Tested on Windows
  • Tested on Linux

Checklist

  • Follows GSD style (no enterprise patterns, no filler)
  • Updates CHANGELOG.md for user-facing changes
  • No unnecessary dependencies added
  • Works on Windows (backslash paths tested)

Breaking Changes

None

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.

1 participant