detect_environment
Detect a project's Symbols environment from caller-supplied flags (symbols.json, symbols dir, package.json, CDN) to get env_type and guidance.
Instructions
[Legacy] Detect Symbols environment from caller-supplied file flags.
Prefer get_project_context — it does the same classification by inspecting
the filesystem directly (no caller-supplied flags needed) AND returns project
owner/key/auth state in the same call.
Kept for backward compatibility with older agent prompts. New code should call
get_project_context(cwd) instead — its response includes env_type,
env_evidence, and env_guidance fields equivalent to this tool's output,
plus owner, key, token_present, and next_step guidance.
Args: has_symbols_json: Whether symbols.json exists in the project root. has_symbols_dir: Whether a symbols/ directory exists with components/, pages/, etc. has_package_json: Whether package.json exists with smbls dependency. has_cdn_import: Whether HTML files contain CDN imports (esm.sh/smbls, etc.). has_iife_script: Whether HTML files use script src smbls (IIFE global). has_json_data: Whether the project uses frank-generated JSON data files. has_mermaid_config: Whether mermaid/wrangler config or GATEWAY_URL/JSON_PATH env vars are present. file_list: Comma-separated list of key files in the project root.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_list | No | ||
| has_json_data | No | ||
| has_cdn_import | No | ||
| has_iife_script | No | ||
| has_symbols_dir | No | ||
| has_package_json | No | ||
| has_symbols_json | No | ||
| has_mermaid_config | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |