-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
refactor(workflows): extract discuss-phase modes/templates/advisor for progressive disclosure (closes #2551) #2607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
trek-e
merged 6 commits into
gsd-build:main
from
trek-e:refactor/2551-discuss-phase-progressive-disclosure
Apr 23, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
894ef1d
refactor(workflows): extract discuss-phase modes/templates/advisor fo…
trek-e 6db6564
fix(#2607): align modes/auto.md check_existing with parent (Update it…
trek-e f1593bd
test(#2607): harden discuss-phase regression tests after #2551 split
trek-e 6c09743
docs(#2607): fix INVENTORY count, context.md placeholders, scout grep…
trek-e f1e4e3a
docs(#2607): label fenced examples + clarify overlay/advisor precedence
trek-e ddb5e21
fix(#2607): extract codebase_drift_gate body to keep execute-phase un…
trek-e File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Codebase scout — map selection table | ||
|
|
||
| > Lazy-loaded reference for the `scout_codebase` step in | ||
| > `workflows/discuss-phase.md` (extracted via #2551 progressive-disclosure | ||
| > refactor). Read this only when prior `.planning/codebase/*.md` maps exist | ||
| > and the workflow needs to pick which 2–3 to load. | ||
|
|
||
| ## Phase-type → recommended maps | ||
|
|
||
| Read 2–3 maps based on inferred phase type. Do NOT read all seven — | ||
| that inflates context without improving discussion quality. | ||
|
|
||
| | Phase type (infer from title + ROADMAP entry) | Read these maps | | ||
| |---|---| | ||
| | UI / frontend / styling / design | CONVENTIONS.md, STRUCTURE.md, STACK.md | | ||
| | Backend / API / service / data model | STACK.md, ARCHITECTURE.md, INTEGRATIONS.md | | ||
| | Integration / third-party / provider | STACK.md, INTEGRATIONS.md, ARCHITECTURE.md | | ||
| | Infrastructure / DevOps / CI / deploy | STACK.md, ARCHITECTURE.md, INTEGRATIONS.md | | ||
| | Testing / QA / coverage | TESTING.md, CONVENTIONS.md, STRUCTURE.md | | ||
| | Documentation / content | CONVENTIONS.md, STRUCTURE.md | | ||
| | Mixed / unclear | STACK.md, ARCHITECTURE.md, CONVENTIONS.md | | ||
|
|
||
| Read CONCERNS.md only if the phase explicitly addresses known concerns or | ||
| security issues. | ||
|
|
||
| ## Single-read rule | ||
|
|
||
| Read each map file in a **single** Read call. Do not read the same file at | ||
| two different offsets — split reads break prompt-cache reuse and cost more | ||
| than a single full read. | ||
|
|
||
| ## No-maps fallback | ||
|
|
||
| If `.planning/codebase/*.md` does not exist: | ||
| 1. Extract key terms from the phase goal (e.g., "feed" → "post", "card", | ||
| "list"; "auth" → "login", "session", "token") | ||
| 2. `grep -rlE "{term1}|{term2}" src/ app/ --include="*.ts" ...` (use `-E` | ||
| for extended regex so the `|` alternation works on both GNU grep and BSD | ||
| grep / macOS), and `ls` the conventional component/hook/util dirs | ||
| 3. Read the 3–5 most relevant files | ||
|
|
||
| ## Output (internal `<codebase_context>`) | ||
|
|
||
| From the scan, identify: | ||
| - **Reusable assets** — components, hooks, utilities usable in this phase | ||
| - **Established patterns** — state management, styling, data fetching | ||
| - **Integration points** — routes, nav, providers where new code connects | ||
| - **Creative options** — approaches the architecture enables or constrains | ||
|
|
||
| Used in `analyze_phase` and `present_gray_areas`. NOT written to a file — | ||
| session-only. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.