Use this skill when the user wants a specific nearby place recommendation with constraints like:
This skill is a single top-level skill. Internally it may call the existing unified-search skill script as a supporting evidence source.
unified-search over those queries and top POI candidates--category explicitly set by caller → used directly (for known categories like cafe, dessert)infer_category(query) matches a known category via regex rules → used_extract_fallback_keywords(query) strips noise words (我/附近/的/找/...) → raw keywords passed directly to Amap as pure keyword search (no typecode, no category normalization)--query and let the fallback pipeline handle keyword extraction. Amap supports free-text keyword search without a category/typecode.--origin explicitly set: used directly--corelocation flag: forces CoreLocationCLI (WiFi-based, ~500m accuracy) to get current coordinates附近/周边/方圆): auto-tries CoreLocationCLI → IP geolocation fallbackpython3 scripts/planner.py \
--query "福州大学旗山校区北门附近,地铁可达,适合坐着吃甜品,偏酸奶/gelato" \
--format markdown
python3 scripts/planner.py \
--origin "福州大学旗山校区北门" \
--category dessert \
--preferences "yogurt,gelato,smoothie" \
--constraints "metro,seating,environment,mall" \
--avoid "night_market,takeaway_only,no_seating" \
--format markdown
python3 scripts/planner.py \
--query "附近有什么电影院支持4DX" \
--corelocation \
--format markdown
The planner returns either:
Confidence levels:
high: repeated store-level hits with supporting evidencemedium: usable candidates but some ambiguitylow: fallback area recommendation onlyThis skill uses the unified-search entrypoint here:
bash <unified-search>/scripts/unified-search.sh "<query>" --num 5 --topic general
Important — which path actually runs (verified 2026-05-31):
unified-search.sh, not unified-search-legacy.sh.--legacy/--mode flag, the script routes to run_search_layer_auto → deep search-layer with --source exa,tavily,grok,tinyfish.
So Grok + TinyFish are part of the real path; the legacy Tavily+Exa+Google merge is not used here.
--num 5 --topic general are legacy-only flags. On the deep search-layer path they are effectively ignored (not forwarded to search-layer), so they do not change behavior.
run-search-layer.sh → search.py (deep search-layer), not unified-search-legacy.sh. The legacy script is a different code path.
See references/lessons-2026-05-31.md for hard-won debugging notes:
proxies={http:None,https:None} (Surge proxy hangs enable_search) and a 1800s timeout for Chinese multi-agent queries.via_stops carries stop names; walking has full turn-by-turn; no max_parts truncation.All output is buffered until completion — there is zero intermediate output even on
stdout. **MANDATORY: when running planner.py via exec, you MUST set timeout=1800
(30 minutes).** Do NOT use shorter timeouts (120s, 600s) — they will kill the process
before unified-search completes. The planner runs these stages sequentially: POI search
→ web enrichment (up to 5 POIs, 30-90s each) → anchor expansion → unified-search
queries (up to 3, 30-90s each) → decision → transit details. 5 POIs × 90s ≈ 7.5 min
for web enrichment alone; the full pipeline can exceed 10 minutes. Do NOT kill the
process because you see "no output yet." If the planner actually hangs, it's more
likely in the unified-search network calls than in local Python code.
unified-search.sh. Do NOT DIY via DuckDuckGo Lite, curl to Baidu/Sogou/360, requests scraping, or ad-hoc
HTTP calls. These are unreliable (empty results, anti-bot blocking, wrong encoding) and
waste time. Only unified-search.sh (especially with Grok) works for Chinese local queries.
The Tavily research script is a secondary option for deep-dive topics, but for POI
enrichment always prefer unified-search.
the skill may supplement with structured venue APIs like Maoyan (m.maoyan.com city-level
cinema list). See references/lessons-2026-06-01.md for Maoyan API notes.
_assess_bundle_quality evaluateseach candidate bundle (max_score ≤2 → poor, avg_score <10 → weak, else acceptable).
If need_fallback=True, the pipeline automatically triggers _specialty_fallback_run
(currently only cinema → Maoyan API) and inserts the fallback bundle at the front of
the run list.
_get_evidence_hints(category) first checks the curated CATEGORY_EVIDENCE_HINTS dict (dessert/cafe/tea/bakery/restaurant/电影院);
if not found, it auto-generates hints from CATEGORY_ALIASES by collecting all aliases
that map to the same canonical category. This means adding a new category only requires
updating CATEGORY_ALIASES — no separate hints dict needed.
CoreLocationCLI (WiFi-based, ~500m accuracy). Requires brew install corelocationcli.
Use --corelocation flag to force this, or rely on auto-detection when origin is
unspecified and query contains nearby hints (附近/周边/方圆). CoreLocationCLI may
trigger a macOS location permission popup on first use.
See scripts/macos_location.py for the implementation.
共 1 个版本