2 Commits

Author SHA1 Message Date
Tom Boucher
f8cf54bd01 fix(agents): add Context7 CLI fallback for MCP tools broken by tools: restriction (#2074)
Closes #1885

The upstream bug anthropics/claude-code#13898 causes Claude Code to strip all
inherited MCP tools from agents that declare a `tools:` frontmatter restriction,
making `mcp__context7__*` declarations in agent frontmatter completely inert.

Implements Fix 2 from issue #1885 (trek-e's chosen approach): replace the
`<mcp_tool_usage>` block in gsd-executor and gsd-planner with a
`<documentation_lookup>` block that checks for MCP availability first, then
falls back to the Context7 CLI via Bash (`npx --yes ctx7@latest`). Adds the
same `<documentation_lookup>` block to the six researcher agents that declare
MCP tools but lacked any fallback instruction.

Agents fixed (8 total):
- gsd-executor (had <mcp_tool_usage>, now <documentation_lookup> with CLI fallback)
- gsd-planner (had <mcp_tool_usage>, now compact <documentation_lookup>; stays under 45K limit)
- gsd-phase-researcher (new <documentation_lookup> block)
- gsd-project-researcher (new <documentation_lookup> block)
- gsd-ui-researcher (new <documentation_lookup> block)
- gsd-advisor-researcher (new <documentation_lookup> block)
- gsd-ai-researcher (new <documentation_lookup> block)
- gsd-domain-researcher (new <documentation_lookup> block)

When the upstream Claude Code bug is fixed, the MCP path in step 1 of the block
will become active automatically — no agent changes needed.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 21:29:37 -04:00
jecanore
a6dd641599 feat: add advisor mode with research-backed discussion
Adds an optional advisor mode to discuss-phase that provides research-backed
comparison tables before asking users to make decisions. Activates when
USER-PROFILE.md exists, degrades gracefully otherwise.

New agent: gsd-advisor-researcher -- spawned in parallel per gray area,
returns structured 5-column comparison tables calibrated to the user vendor
philosophy preference (full_maturity/standard/minimal_decisive).

Workflow changes (discuss-phase.md):
- Advisor mode detection in analyze_phase step
- New advisor_research step spawns parallel research agents
- Table-first discussion flow in discuss_areas when advisor mode active
- Standard conversational flow unchanged when advisor mode inactive
2026-03-19 20:08:30 -05:00