Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .claude/commands/expand-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ Start with open questions:
- What happens as a result
- What errors could occur

**Reference material:** If the user shares a link (e.g. design examples, a competitor's page, API docs), open it with the `WebFetch` tool and use what you find to make the features concrete. You may also use `WebSearch` to look up references the user mentions by name. These tools are available to you in this session — do not tell the user you cannot browse the web. You can read files in the project (`Read`, `Glob`, `Grep`), but you cannot write files or run commands; features are created only through the feature tools.

## Phase 2: Clarify Details

For each new capability, understand:
Expand Down
25 changes: 17 additions & 8 deletions server/services/expand_chat_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@
"mcp__features__feature_get_stats",
]

# Read-only built-in tools for the expand session. WebFetch/WebSearch let the
# assistant open reference links the user shares (e.g. design examples).
# The session uses its own generated settings file, so these must be listed
# here -- the user's ~/.claude/settings.json and the project's
# .claude_settings.json do not apply to this chat.
EXPAND_BUILTIN_TOOLS = [
"Read",
"Glob",
"Grep",
"WebFetch",
"WebSearch",
]


class ExpandChatSession:
"""
Expand Down Expand Up @@ -146,6 +159,9 @@ async def start(self) -> AsyncGenerator[dict, None]:
"allow": [
"Read(./**)",
"Glob(./**)",
"Grep(./**)",
"WebFetch",
"WebSearch",
*EXPAND_FEATURE_TOOLS,
],
"deny": ["Write", "Edit", "MultiEdit", "NotebookEdit", "Bash"],
Expand Down Expand Up @@ -190,14 +206,7 @@ async def start(self) -> AsyncGenerator[dict, None]:
effort=effort, # type: ignore[arg-type] # SDK 0.1.61 Literal omits "xhigh"
cli_path=system_cli,
system_prompt=system_prompt,
allowed_tools=[
"Read",
"Glob",
"Grep",
"WebFetch",
"WebSearch",
*EXPAND_FEATURE_TOOLS,
],
allowed_tools=[*EXPAND_BUILTIN_TOOLS, *EXPAND_FEATURE_TOOLS],
disallowed_tools=["Write", "Edit", "MultiEdit", "NotebookEdit", "Bash"],
mcp_servers=mcp_servers, # type: ignore[arg-type] # SDK accepts dict config at runtime
permission_mode="bypassPermissions",
Expand Down