local-places

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Local Places

本地场所

Location intelligence powered by Nimble Web Search Agents and web data APIs.
User request: $ARGUMENTS
Before running any commands, read
references/nimble-playbook.md
for Claude Code constraints (no shell state, no
&
/
wait
, sub-agent permissions, communication style).

由Nimble Web Search Agents和网络数据API驱动的位置智能工具。
用户请求:$ARGUMENTS
运行任何命令前,请阅读
references/nimble-playbook.md
了解Claude Code的限制(无Shell状态、不支持
&
/
wait
、子Agent权限、沟通风格)。

Instructions

操作说明

Step 0: Preflight

步骤0:预检

Run the preflight pattern from
references/nimble-playbook.md
(5 simultaneous Bash calls: date calc, today, CLI check, profile load, index.md load).
Also simultaneously:
  • mkdir -p ~/.nimble/memory/{reports,local-places/checkpoints}
  • Check for existing checkpoints:
    ls ~/.nimble/memory/local-places/checkpoints/ 2>/dev/null
From the results:
  • CLI missing or API key unset ->
    references/profile-and-onboarding.md
    , stop
  • Profile exists -> note the user's location preferences if any. Determine mode using smart date windowing from
    references/nimble-playbook.md
    :
    • Full mode: first run OR last run > 14 days ago
    • Quick refresh: last run < 14 days ago (skip social enrichment, reviews only for new places)
    • Same-day repeat: if
      last_runs.local-places
      is today, check if a report already exists at
      ~/.nimble/memory/reports/local-places-*[today].md
      . If so, ask: "Already ran today for this area. Run again for fresh data?" Don't silently re-run.
    • Skip to Step 1
  • No profile -> that's fine. Local places doesn't require onboarding. Proceed to Step 1.
执行
references/nimble-playbook.md
中的预检流程(5个并行Bash调用:日期计算、当前日期、CLI检查、配置文件加载、index.md加载)。
同时执行:
  • mkdir -p ~/.nimble/memory/{reports,local-places/checkpoints}
  • 检查现有检查点:
    ls ~/.nimble/memory/local-places/checkpoints/ 2>/dev/null
根据结果:
  • CLI缺失或API密钥未设置 -> 参考
    references/profile-and-onboarding.md
    ,停止操作
  • 配置文件存在 -> 记录用户的位置偏好(如有)。根据
    references/nimble-playbook.md
    中的智能日期窗口逻辑确定模式:
    • 完整模式:首次运行 或 上次运行距今超过14天
    • 快速刷新模式:上次运行距今不足14天(跳过社交信息丰富环节,仅为新场所获取评论)
    • 当日重复运行:如果
      last_runs.local-places
      为今日,检查
      ~/.nimble/memory/reports/local-places-*[today].md
      是否已存在报告。若存在,询问:“今日已针对该区域运行过此查询。是否重新运行以获取最新数据?”请勿静默重新运行。
    • 跳转至步骤1
  • 无配置文件 -> 无需担心。本地场所搜索无需完成入门流程,直接进入步骤1。

Step 1: Parse Request & Starting Questions

步骤1:解析请求与初始问题

Parse
$ARGUMENTS
for place type and location. Extract:
FieldRequiredSource
Place typeYesUser input ("coffee shops", "gyms", "restaurants")
LocationYesUser input ("Williamsburg", "downtown Austin", "Park Slope")
FiltersOptionalUser input ("with good reviews", "open late", "cheap")
Output preferenceOptionalUser input ("map", "list", "guide")
If both place type and location are clear from
$ARGUMENTS
, confirm briefly and proceed: "Searching for coffee shops in Williamsburg, Brooklyn..."
If partial or ambiguous, ask one combined question in plain text:
"What type of places are you looking for, and where? (e.g., 'coffee shops in Williamsburg' or 'gyms near downtown Austin')"
If the user provided both but you want to scope further, use AskUserQuestion (counts as 1 of max 2 prompts):
How thorough should this search be?
  • Quick scan -- top results from Google Maps + Yelp (~20 places)
  • Comprehensive -- full discovery + social enrichment + reviews (~50+ places)
  • Deep dive with map -- everything above + interactive neighborhood map
解析
$ARGUMENTS
以提取场所类型和位置信息:
字段是否必填来源
场所类型用户输入(如“咖啡店”“健身房”“餐厅”)
位置用户输入(如“Williamsburg”“奥斯汀市中心”“Park Slope”)
筛选条件可选用户输入(如“好评商家”“营业至深夜”“平价”)
输出偏好可选用户输入(如“地图”“列表”“指南”)
$ARGUMENTS
中场所类型和位置均明确
,简要确认后继续:“正在搜索Williamsburg, Brooklyn咖啡店……”
若信息不全或模糊,用自然语言提出一个合并问题:
“你想找什么类型的场所,位置在哪里?(例如:'Williamsburg的咖啡店' 或 '奥斯汀市中心附近的健身房')”
若用户已提供两者,但需要进一步限定范围,使用AskUserQuestion(计入最多2次提示的限制):
搜索的详细程度如何?
  • 快速扫描 -- 来自Google Maps + Yelp的顶级结果(约20个场所)
  • 全面搜索 -- 完整发现+社交信息丰富+评论(约50+个场所)
  • 深度探索含地图 -- 包含以上所有内容+交互式社区地图

Step 2: Location Disambiguation

步骤2:位置歧义消除

Before any API calls, resolve the location to avoid wasted searches.
Disambiguation triggers:
  • Location name exists in multiple cities/states (e.g., "Williamsburg" = Brooklyn NY vs. Williamsburg VA)
  • Location is a broad area (e.g., "downtown Austin" = multiple neighborhoods)
  • Location is informal (e.g., "Soho" = NYC vs. London)
If ambiguous, ask the user (counts toward 2-prompt max):
"There are a few places called Williamsburg. Which one?"
  • Williamsburg, Brooklyn, NY
  • Williamsburg, VA
  • Other -- I'll specify
If unambiguous, infer the full location (city + state/country) and confirm inline: "Searching Williamsburg, Brooklyn, NY..."
After disambiguation, derive the
slug
for checkpointing and file paths: lowercase, hyphenated, includes city + state/country (e.g.,
williamsburg-brooklyn-ny
).
在进行任何API调用前,先解析位置以避免无效搜索。
歧义触发场景:
  • 位置名称存在于多个城市/州(例如:“Williamsburg”=纽约布鲁克林 vs 弗吉尼亚州Williamsburg)
  • 位置为宽泛区域(例如:“奥斯汀市中心”包含多个社区)
  • 位置为非正式名称(例如:“Soho”=纽约 vs 伦敦)
若存在歧义,询问用户(计入最多2次提示的限制):
“名为Williamsburg的地点有多个,你指的是哪一个?”
  • Williamsburg, Brooklyn, NY
  • Williamsburg, VA
  • 其他 -- 我将指定具体位置
若无歧义,推断完整位置(城市+州/国家)并在线确认:“正在搜索Williamsburg, Brooklyn, NY……”
消除歧义后,生成用于检查点和文件路径的
slug
:小写、连字符连接、包含城市+州/国家(例如:
williamsburg-brooklyn-ny
)。

Step 3: Check for Existing Checkpoint

步骤3:检查现有检查点

Follow the Checkpointing & Resume pattern from
references/memory-and-distribution.md
.
Check:
cat ~/.nimble/memory/local-places/checkpoints/{slug}/discovery.json 2>/dev/null
  • Checkpoint found -> offer: "Found previous run ({N} places from {date}). Resume and fill gaps, or start fresh?"
  • No checkpoint -> proceed to Step 4
遵循
references/memory-and-distribution.md
中的检查点与恢复流程。
检查:
cat ~/.nimble/memory/local-places/checkpoints/{slug}/discovery.json 2>/dev/null
  • 找到检查点 -> 提供选项:“发现之前的运行记录({N}个场所,日期:{date})。是恢复并补充缺失信息,还是重新开始?”
  • 无检查点 -> 进入步骤4

Step 4: WSA Discovery

步骤4:WSA发现

Discover available WSAs for all phases before execution. Run these searches simultaneously:
bash
nimble agent list --search "maps" --limit 20
bash
nimble agent list --search "reviews" --limit 20
bash
nimble agent list --search "social" --limit 20
bash
nimble agent list --search "{place-type}" --limit 20
From the combined results:
  1. Filter by
    entity_type
    : SERP for discovery, PDP/Profile for enrichment/detail
  2. Prefer
    managed_by: "nimble"
    over
    managed_by: "community"
  3. Classify into phases -- see
    references/wsa-pipeline.md
    for classification strategy
  4. Validate each with
    nimble agent get --template-name {name}
    to confirm params
  5. Cache all discovered WSA names + validated params for the rest of the run
If no WSAs found for a phase, that phase falls back to
nimble search
. Log which phases had WSA coverage and which are using fallback.
在执行前发现所有阶段可用的WSA。并行运行以下搜索:
bash
nimble agent list --search "maps" --limit 20
bash
nimble agent list --search "reviews" --limit 20
bash
nimble agent list --search "social" --limit 20
bash
nimble agent list --search "{place-type}" --limit 20
从合并结果中:
  1. entity_type
    筛选:SERP用于发现,PDP/Profile用于信息丰富/细节获取
  2. 优先选择
    managed_by: "nimble"
    而非
    managed_by: "community"
  3. 按阶段分类 -- 参考
    references/wsa-pipeline.md
    中的分类策略
  4. 使用
    nimble agent get --template-name {name}
    验证每个WSA以确认参数
  5. 缓存所有发现的WSA名称+验证后的参数,供后续运行使用
若某阶段未找到WSA,则该阶段 fallback 至
nimble search
。记录哪些阶段有WSA覆盖,哪些使用备用方案。

Step 5: Primary Search (Phase 1)

步骤5:主搜索(阶段1)

Read
references/wsa-pipeline.md
for category detection logic.
Run discovered maps/location WSAs simultaneously, using the validated params from Step 4:
bash
nimble agent run --agent {discovered_maps_wsa} --params '{...validated params...}'
bash
nimble agent run --agent {discovered_review_site_wsa} --params '{...validated params...}'
Tertiary (conditional): Run discovered credibility WSAs only if primary + secondary return < 10 combined unique results, or if the user asked for credibility/trust data.
If any WSA fails or returns empty, fall back to:
nimble search --query "[place-type] in [location]" --max-results 20 --search-depth lite
After discovery:
  1. Parse all results into a unified entity list
  2. Deduplicate following the Entity Deduplication pattern from
    references/nimble-playbook.md
    : place_id exact match -> domain normalization -> fuzzy name + city
  3. Save checkpoint:
    ~/.nimble/memory/local-places/checkpoints/{slug}/discovery.json
阅读
references/wsa-pipeline.md
了解类别检测逻辑。
并行运行步骤4中发现的地图/位置类WSA,使用验证后的参数:
bash
nimble agent run --agent {discovered_maps_wsa} --params '{...validated params...}'
bash
nimble agent run --agent {discovered_review_site_wsa} --params '{...validated params...}'
第三级(条件触发): 仅当主搜索+次级搜索返回的唯一结果少于10个,或用户要求可信度/信任数据时,运行发现的可信度类WSA。
若任何WSA失败或返回空结果,fallback至:
nimble search --query "[place-type] in [location]" --max-results 20 --search-depth lite
发现完成后:
  1. 将所有结果解析为统一实体列表
  2. 根据
    references/nimble-playbook.md
    中的实体去重流程去重:place_id精确匹配 -> 域名标准化 -> 模糊名称+城市
  3. 保存检查点:
    ~/.nimble/memory/local-places/checkpoints/{slug}/discovery.json

Step 6: Social Enrichment (Phase 2)

步骤6:社交信息丰富(阶段2)

For each discovered place that has a Facebook page or Instagram handle, run the social WSAs discovered in Step 4. Batch max 4 concurrent Bash calls.
bash
nimble agent run --agent {discovered_social_wsa} --params '{...validated params...}'
Run each discovered social WSA for places with matching handles. Skip social platforms for which no WSA was discovered. If no social WSAs were found in Step 4, skip this phase entirely.
Save checkpoint:
~/.nimble/memory/local-places/checkpoints/{slug}/social.json
对于每个有Facebook页面或Instagram账号的已发现场所,运行步骤4中发现的社交类WSA。最多并行4个Bash调用。
bash
nimble agent run --agent {discovered_social_wsa} --params '{...validated params...}'
为匹配账号的场所运行每个已发现的社交类WSA。跳过未发现对应WSA的社交平台。若步骤4中未找到任何社交类WSA,则完全跳过此阶段。
保存检查点:
~/.nimble/memory/local-places/checkpoints/{slug}/social.json

Step 7: Reviews (Phase 3)

步骤7:评论获取(阶段3)

For the top places (by source count and data completeness), run the review WSAs discovered in Step 4:
bash
nimble agent run --agent {discovered_reviews_wsa} --params '{...validated params...}'
Batch max 4 concurrent calls. Focus on places that have a
place_id
or equivalent identifier from Phase 1 discovery. If no review WSAs were found in Step 4, fall back to:
nimble search --query "[place-name] reviews" --max-results 5 --search-depth lite
Save checkpoint:
~/.nimble/memory/local-places/checkpoints/{slug}/reviews.json
对于排名靠前的场所(按来源数量和数据完整性排序),运行步骤4中发现的评论类WSA:
bash
nimble agent run --agent {discovered_reviews_wsa} --params '{...validated params...}'
最多并行4个调用。重点关注阶段1发现中带有
place_id
或等效标识符的场所。若步骤4中未找到评论类WSA,fallback至:
nimble search --query "[place-name] reviews" --max-results 5 --search-depth lite
保存检查点:
~/.nimble/memory/local-places/checkpoints/{slug}/reviews.json

Step 8: Food/Drink Bonus (Phase 4)

步骤8:餐饮额外环节(阶段4)

Auto-trigger when the place type category matches food/drink keywords. See
references/wsa-pipeline.md
for the category detection logic.
If triggered, run the delivery/food WSAs discovered in Step 4. Discovery first, then detail:
bash
nimble agent run --agent {discovered_delivery_serp_wsa} --params '{...validated params...}'
For places found on delivery platforms, fetch full details using discovered detail WSAs:
bash
nimble agent run --agent {discovered_delivery_detail_wsa} --params '{...validated params...}'
If no delivery WSAs were found in Step 4, fall back to:
nimble search --query "[place-name] [location] delivery" --max-results 3 --search-depth lite
Only run for food/drink categories. Skip if category doesn't match.
自动触发:当场所类型类别匹配餐饮相关关键词时。参考
references/wsa-pipeline.md
中的类别检测逻辑。
若触发,运行步骤4中发现的配送/餐饮类WSA。先发现,再获取细节:
bash
nimble agent run --agent {discovered_delivery_serp_wsa} --params '{...validated params...}'
对于在配送平台上找到的场所,使用已发现的细节类WSA获取完整信息:
bash
nimble agent run --agent {discovered_delivery_detail_wsa} --params '{...validated params...}'
若步骤4中未找到配送类WSA,fallback至:
nimble search --query "[place-name] [location] delivery" --max-results 3 --search-depth lite
仅针对餐饮类别运行。若类别不匹配则跳过。

Step 9: Deduplication & Confidence Scoring

步骤9:去重与置信度评分

Deduplication: Run a final dedup pass across all phases following the Entity Deduplication pattern from
references/nimble-playbook.md
. Merge fields from multiple sources into a single enriched record per place.
Confidence scoring: Follow the Entity Confidence Scoring pattern from
references/nimble-playbook.md
. Skill-specific target fields (N=8):
FieldDescription
nameBusiness name
addressFull street address
phonePhone number
websiteWebsite URL
ratingAverage rating
review_countNumber of reviews
socialAt least one social profile
hoursOperating hours
Scoring criteria:
  • High (8/8 fields + 2+ sources + 10+ reviews) -> display as
    *** High
  • Medium (5-7/8 fields OR 2+ sources with partial data) ->
    ** Medium
  • Low (<=4/8 fields, single source, few/no reviews) ->
    * Low
去重: 根据
references/nimble-playbook.md
中的实体去重流程,对所有阶段的结果进行最终去重。将多个来源的字段合并为每个场所的单一增强记录。
置信度评分: 遵循
references/nimble-playbook.md
中的实体置信度评分流程。本技能特定目标字段(共8个):
字段描述
name商家名称
address完整街道地址
phone电话号码
website网站URL
rating平均评分
review_count评论数量
social至少一个社交账号
hours营业时间
评分标准:
  • (8/8字段 + 2+来源 + 10+评论)-> 显示为
    *** High
  • (5-7/8字段 或 2+来源但数据不完整)->
    ** Medium
  • (<=4/8字段、单一来源、少量/无评论)->
    * Low

Step 10: Output

步骤10:输出

Present results as a numbered table sorted by confidence (High first), then by rating within each tier.
undefined
以编号表格形式呈现结果,按置信度排序(高置信度优先),同一层级内按评分排序。
undefined

Local Places: [Place Type] in [Location]

本地场所:[场所类型] in [位置]

Found [N] places | [Date] | Confidence: [H] High, [M] Medium, [L] Low
找到[N]个场所 | [日期] | 置信度:[H]高,[M]中,[L]低

Results

结果

#NameRatingReviewsConfidenceAddressSources
1Place A4.8 (312)*** High123 Main St[Maps][Yelp]
2Place B4.6 (89)** Medium456 Oak Ave[Maps]
...
#名称评分评论数置信度地址来源
1场所A4.8 (312)*** High123 Main St[Maps][Yelp]
2场所B4.6 (89)** Medium456 Oak Ave[Maps]
...

Top Picks (High Confidence)

精选推荐(高置信度)

1. Place A

1. 场所A

  • Address: 123 Main St, Williamsburg, Brooklyn, NY
  • Phone: (555) 123-4567 | Website: placea.com
  • Rating: 4.8/5 (312 reviews on Google Maps, 289 on Yelp)
  • Social: Instagram @placea (2.1K followers) | Facebook (1.8K likes)
  • Hours: Mon-Fri 7am-7pm, Sat-Sun 8am-6pm
  • Delivery: Available on DoorDash, Uber Eats
  • Why it stands out: [1-2 sentences from review highlights]
  • Sources: Google Maps | Yelp | Facebook
[Repeat for each High confidence place]
  • 地址: 123 Main St, Williamsburg, Brooklyn, NY
  • 电话: (555) 123-4567 | 官网: placea.com
  • 评分: 4.8/5(Google Maps 312条评论,Yelp 289条评论)
  • 社交账号: Instagram @placea(2.1K粉丝)| Facebook(1.8K点赞)
  • 营业时间: 周一至周五7am-7pm,周六至周日8am-6pm
  • 配送服务: 支持DoorDash、Uber Eats
  • 亮点: [1-2句评论摘要]
  • 来源: Google Maps | Yelp | Facebook
[为每个高置信度场所重复上述格式]

Other Results (Medium + Low Confidence)

其他结果(中+低置信度)

[Briefer format -- name, rating, address, missing data noted]
[简化格式 -- 名称、评分、地址、标注缺失数据]

What's Missing

缺失信息说明

[Note any data gaps: "3 places had no website or social presence", "Reviews unavailable for BBB-only listings"]

**Source links are mandatory.** Every place must have at least one clickable source
URL (Google Maps link, Yelp listing, website, or social profile). Places without
any source link should be noted in "What's Missing" but still included if they have
sufficient data from WSA results.

**Drill-down:** After presenting, tell the user:
> "Want details on any place? Say 'tell me more about #3' or ask for the
> interactive map."
[记录数据缺口:“3个场所无官网或社交账号”,“仅在BBB上列出的场所无评论”]

**来源链接为必填项**。每个场所必须至少有一个可点击的来源URL(Google Maps链接、Yelp列表、官网或社交账号)。若无任何来源链接的场所,需在“缺失信息说明”中注明,但如果WSA结果提供了足够数据,仍需包含在列表中。

**深入查询:** 展示结果后,告知用户:
> “想了解某个场所的详细信息?请说‘告诉我#3的详情’或请求查看交互式地图。”

Step 11: Interactive Map (on request or "Deep dive" mode)

步骤11:交互式地图(按需或“深度探索”模式)

Generate an HTML file with Leaflet.js + OpenStreetMap tiles. See
references/wsa-pipeline.md
for the full map generation pattern and color scheme.
Save to:
~/.nimble/memory/local-places/{slug}-map-{date}.html
Open in browser:
open ~/.nimble/memory/local-places/{slug}-map-{date}.html
Only generate automatically if the user chose "Deep dive with map" in Step 1. For map generation details, see
references/wsa-pipeline.md
. Otherwise, offer it as a follow-up action.
使用Leaflet.js + OpenStreetMap瓦片生成HTML文件。完整地图生成模式和配色方案请参考
references/wsa-pipeline.md
保存至:
~/.nimble/memory/local-places/{slug}-map-{date}.html
在浏览器中打开:
open ~/.nimble/memory/local-places/{slug}-map-{date}.html
仅当用户在步骤1中选择“深度探索含地图”时自动生成。否则,将其作为后续操作选项提供。

Step 12: Save to Memory

步骤12:保存至内存

Make all Write calls simultaneously:
  • Report ->
    ~/.nimble/memory/reports/local-places-{slug}-{date}.md
  • Per-place data ->
    ~/.nimble/memory/local-places/{slug}/places.json
    (structured JSON with all enriched records)
  • Profile -> update
    last_runs.local-places
    in
    ~/.nimble/business-profile.json
    (only if profile exists)
  • Follow the wiki update pattern from
    references/memory-and-distribution.md
    : update
    index.md
    rows for all affected entity files, append a
    log.md
    entry for this run.
  • Clean up checkpoint (complete run) or keep (partial run)
同时执行所有写入操作:
  • 报告 ->
    ~/.nimble/memory/reports/local-places-{slug}-{date}.md
  • 单场所数据 ->
    ~/.nimble/memory/local-places/{slug}/places.json
    (包含所有增强记录的结构化JSON)
  • 配置文件 -> 更新
    ~/.nimble/business-profile.json
    中的
    last_runs.local-places
    (仅当配置文件存在时)
  • 遵循
    references/memory-and-distribution.md
    中的维基更新模式:更新所有受影响实体文件的
    index.md
    行,在
    log.md
    中追加本次运行的记录。
  • 清理检查点(运行完成)或保留(运行中断)

Step 13: Share & Distribute

步骤13:分享与分发

Always offer distribution -- do not skip this step. Follow
references/memory-and-distribution.md
for connector detection, sharing flow, and source links enforcement.
Notion: full results table as a dated subpage. Slack: TL;DR with top 5 places only.
必须提供分发选项 -- 请勿跳过此步骤。遵循
references/memory-and-distribution.md
中的连接器检测、分享流程和来源链接强制要求。
Notion:将完整结果表格作为带日期的子页面。 Slack:仅分享包含前5个场所的精简版。

Step 14: Follow-ups

步骤14:后续操作

  • "Tell me more about #N" -> show full detail for that place
  • "Show the map" -> generate interactive map (Step 11)
  • "Add filters" -> re-search with additional constraints
  • "Search nearby area" -> expand to adjacent neighborhoods
  • "Export as CSV" -> generate CSV from places.json
  • "Looks good" -> done
Sibling skill suggestions:
Next steps:
  • Run
    company-deep-dive
    for a full 360 profile on any business from this list
  • Run
    meeting-prep
    if you're meeting with someone at one of these businesses
  • Run
    competitor-positioning
    to compare businesses in this area

  • “告诉我#N的详情” -> 展示该场所的完整信息
  • “显示地图” -> 生成交互式地图(步骤11)
  • “添加筛选条件” -> 使用额外约束重新搜索
  • “搜索附近区域” -> 扩展至相邻社区
  • “导出为CSV” -> 从places.json生成CSV文件
  • “结果满意” -> 结束操作
关联技能建议:
下一步操作:
  • 对列表中的任意商家运行
    company-deep-dive
    以获取完整的360度概况
  • 若你将与某商家人员会面,运行
    meeting-prep
  • 运行
    competitor-positioning
    以对比该区域内的商家

Sub-Agent Strategy

子Agent策略

For comprehensive searches (50+ places), use
nimble-researcher
agents (
agents/nimble-researcher.md
) to parallelize enrichment.
Follow the sub-agent spawning rules from
references/nimble-playbook.md
(bypassPermissions, batch max 4, explicit Bash instruction, fallback on failure). For WSA calls at scale (11+ entities), tell agents to use
agent run-batch
instead of individual calls. See the Scaled Execution pattern in
references/nimble-playbook.md
for tier selection. Pass the discovered WSA names from Step 4 to each agent so they use the same cached names.
Spawn pattern: One agent per batch of 10 places for social enrichment. Each agent runs the Phase 2 WSAs for its batch and returns structured results.
Single-batch optimization: If <= 10 places, run enrichment directly from the main context instead of spawning agents -- saves overhead.
Fallback: If any agent fails, run those WSA calls directly from the main context.

对于全面搜索(50+个场所),使用
nimble-researcher
Agent(
agents/nimble-researcher.md
)并行处理信息丰富环节。
遵循
references/nimble-playbook.md
中的子Agent生成规则(bypassPermissions、最多批量4个、明确Bash指令、失败时fallback)。对于大规模WSA调用(11+个实体),告知Agent使用
agent run-batch
而非单个调用。参考
references/nimble-playbook.md
中的规模化执行模式选择层级。将步骤4中发现的WSA名称传递给每个Agent,确保它们使用相同的缓存名称。
生成模式: 每10个场所为一批次,分配一个Agent处理社交信息丰富环节。每个Agent为其批次运行阶段2的WSA并返回结构化结果。
单批次优化: 若场所数量<=10个,直接在主上下文运行信息丰富环节,无需生成Agent -- 减少开销。
Fallback: 若任何Agent失败,直接在主上下文运行对应的WSA调用。

Agent Teams Mode (Dual-Mode)

Agent团队模式(双模式)

Check at startup:
echo $CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS
Team mode (flag set): Spawn teammates for parallel phases:
  • Discovery teammate: Runs all Phase 1 WSAs, deduplicates, returns unified list
  • Enrichment teammate: Runs Phases 2-4 for each place batch
  • Lead (you): Coordinates, scores, generates output and map
Solo mode (flag not set): Standard sequential flow from Steps 4-7.

启动时检查:
echo $CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS
团队模式(已设置标志):生成队友并行处理不同阶段:
  • 发现队友:运行所有阶段1的WSA,去重后返回统一列表
  • 信息丰富队友:为每个场所批次运行阶段2-4
  • 负责人(你):协调、评分、生成输出和地图
单例模式(未设置标志):遵循步骤4-7的标准顺序流程。

Error Handling

错误处理

See
references/nimble-playbook.md
for the standard error table (missing API key, 429, 401, empty results, extraction garbage). Skill-specific errors:
  • WSA/Search 500: Retry once with the same params. If still failing, fall back to
    nimble search
    for that place/query. Log the failure but don't skip the place.
  • WSA/Search timeout: Retry once, then skip that call and continue — consistent with the playbook's timeout policy.
  • WSA not found: If no WSAs are discovered for a phase, skip that phase's WSA calls and fall back to
    nimble search
    . Log which phases had no WSA coverage.
  • Location not found: "Couldn't find results for [location]. Could you be more specific? Try including city and state (e.g., 'Williamsburg, Brooklyn, NY')."
  • No results for place type: "No [place type] found in [location]. Want to try a broader category or nearby area?"
  • Ambiguous place type: "Did you mean [option A] or [option B]?" (e.g., "bar" could be cocktail bar, sports bar, wine bar)
参考
references/nimble-playbook.md
中的标准错误表(缺失API密钥、429、401、空结果、提取无效数据)。本技能特定错误:
  • WSA/搜索500错误:使用相同参数重试一次。若仍失败,针对该场所/查询fallback至
    nimble search
    。记录失败但不跳过该场所。
  • WSA/搜索超时:重试一次,然后跳过该调用继续执行 -- 与手册中的超时政策一致。
  • 未找到WSA:若某阶段未发现WSA,跳过该阶段的WSA调用并fallback至
    nimble search
    。记录哪些阶段无WSA覆盖。
  • 未找到位置:“无法找到[位置]的结果。能否提供更具体的信息?请尝试包含城市和州(例如:'Williamsburg, Brooklyn, NY')。”
  • 无对应场所类型结果:“[位置]未找到[场所类型]。是否尝试更宽泛的类别或附近区域?”
  • 场所类型模糊:“你指的是[选项A]还是[选项B]?”(例如:“bar”可能指鸡尾酒吧、体育酒吧、葡萄酒吧)