[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6J7SBMAPERXC1P6BS2HANBA":3,"skill-same:01M6J7SBMAPERXC1P6BS2HANBA":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":25,"linkOnly":26,"markdownContent":27,"markdownBody":28,"frontMatter":29,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M6J7SBMAPERXC1P6BS2HANBA","dine",null,"Restaurant recommendation flow using local context and credit-burn signals.","mhxie\u002FAtelier","mhxie","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9162430?v=4","01M6J7PRJKFB52E8SAG6PNBHHJ","Minghao Xie","01M6J7PRPV4W5620MQD6QEXNPW",5,"MIT","https:\u002F\u002Fgithub.com\u002Fmhxie\u002FAtelier\u002Fblob\u002Fmain\u002Fskills\u002Fdine\u002FSKILL.md",[],[5,19,20,21,22,23,24],"flow","context","local","signals","burn","recommendation","2026-11-10 10:12:30",false,"---\nname: dine\ndescription: Restaurant recommendation flow using local context and credit-burn signals.\n---\n## Purpose\n\nFour intents (auto-detected from args):\n- **A. Restaurant Recommendation** (default): pick 3 restaurant candidates based on user-supplied context, historical preferences, and credit-burn opportunities. Read-only on catalog docs under this intent.\n- **B. Workplace Catering Tracker**: parse a weekly catering PDF from the folder mapped to a workplace slug in `profile\u002Fdiet.md`, choose health-aware picks for the user's attendance days, and surface a confirmed table for the user to record themselves (the system does not write to daily notes).\n- **C. Meal Log Capture** (ad-hoc): log a meal the user just ate. Parses receipt images (HEIC\u002FJPG\u002FPNG\u002FPDF) when provided, cross-references catalogs for missing slots, asks ONE compact question for what cannot be derived, shows a draft row + side-effect plan, and appends to the private meal-history tracker on confirm. An explicitly trip-associated capture may also add a date-only meal-history reference to that trip note. Co-equal capture path with `\u002Fhi` Dining Pulse.\n- **D. Establishment Update**: update one physical branch's address or lifecycle without creating a meal-history row.\n\n## Quick start\n\nIntent A examples:\n- `\u002Fdine` → ask all context\n- `\u002Fdine 工作日午餐` → use as scene hint, ask remaining\n- `\u002Fdine 朋友 4 人 川菜 dinner` → use as filters, ask remaining\n- `\u002Fdine \u003Ccity> burn credit` → location hint + flag credit-burn priority\n\nIntent B examples (first arg = workplace slug mapped in gitignored `profile\u002Fdiet.md`):\n- `\u002Fdine \u003Cslug>` → find the latest PDF in the mapped catering folder covering this week, pick per `profile\u002Fdiet.md` attendance pattern\n- `\u002Fdine \u003Cslug> \u003Cpdf-path>` → explicit PDF\n- `\u002Fdine \u003Cslug> all` → all 5 weekdays (override)\n- `\u002Fdine \u003Cslug> \u003Cday-codes>` → custom attendance set (override; any day-code combination works)\n\nIntent C examples (logging a meal you just ate):\n- `\u002Fdine log 今天午饭吃的 \u003Crestaurant> 两人 $\u003Camount>` → free-text meal report\n- `\u002Fdine 今天晚饭吃的是 \u002Fpath\u002Fto\u002Freceipt.heic` → receipt image (HEIC auto-converted before Read)\n- `\u002Fdine 昨天 \u003Crestaurant> dinner $\u003Camount>` → dated free text (respects late-sleep rule)\n- `\u002Fdine log \u002Fpath\u002Fto\u002Freceipt.pdf` → receipt PDF outside any catering folder\n\nIntent D examples (maintaining a physical branch):\n- `\u002Fdine status \u003Crestaurant> \u003Cbranch> closed`\n- `\u002Fdine status \u003Crestaurant> \u003Cbranch> moved \u003Cnew-address>`\n\nIf args present, parse them as initial filters; only ask for slots not derivable.\n\n## Step 0: Intent detection\n\nParse args. Precedence: **D → B → C → A** (most specific match wins; ambiguous → ask user one line before routing).\n\nRead `profile\u002Fdiet.md` once, if present, to resolve workplace slugs, catering folders, and `## Catalog files`. Do not assume the private mappings from examples in this command.\n\nRoute to **Intent D** when the leading subcommand is `status`.\n\nElse route to **Intent B** if any of:\n- First arg matches a workplace `Slug` declared in `profile\u002Fdiet.md`\n- Any arg is a `.pdf` path under a catering `Folder` declared in `profile\u002Fdiet.md`\n- Args contain the literal token `catering`\n\nElse route to **Intent C** if any of:\n- Leading subcommand `log` (e.g., `\u002Fdine log \u003Cfreetext>`)\n- Args contain past-tense \u002F reporting markers: `记录` \u002F `log` \u002F `吃了` \u002F `吃的` \u002F `刚吃完` \u002F \"今天X吃的\" \u002F \"昨天Y\" \u002F \"just had\"\n- An image path (`.heic` \u002F `.jpg` \u002F `.jpeg` \u002F `.png`) is provided\n- A `.pdf` path is provided **outside** any `$OV\u002F*\u002Fcatering\u002F` folder\n- Free text mentions a specific restaurant + amount\u002Fparty (e.g., `\u003Cname> 两人 $\u003Camount>`) without a forward-looking verb\n\nDo NOT route to C if the message is forward-looking: contains `推荐` \u002F `去哪吃` \u002F `想吃` \u002F `what should I eat` \u002F `where to eat` \u002F `今晚吃什么` → fall through to A.\n\nOtherwise route to **Intent A** (continue to Step 1 below).\n\nFor Intent B, jump to the \"Intent B: Workplace Catering Tracker\" section near the bottom and skip Steps 1-5.\nFor Intent C, read `protocols\u002Fdining-capture.md` and follow it; skip Steps 1-5.\nFor Intent D, jump to the \"Intent D: Establishment Update\" section near the bottom and skip Steps 1-5.\n\n## Step 1: Gather context\n\nFor missing slots, ask via `AskUserQuestion` or sequential 1-line prompts (whichever fits faster). Required slots first; optional slots only if useful.\n\n| Slot | Options | Required |\n|---|---|---|\n| **Location** | Home region \u002F nearby city \u002F travel destination \u002F other | Y |\n| **Party** | Solo \u002F Partner \u002F Family (N) \u002F Friends (N) \u002F Mixed work | Y |\n| **Meal** | Lunch \u002F Dinner \u002F Brunch \u002F Late night | Y |\n| **Time budget** | Quick (\u003C30min) \u002F Standard (1-2h) \u002F Leisurely (2h+) | Y |\n| Mood \u002F cuisine | Free text or options declared in `profile\u002Fdiet.md` | N (default any) |\n| **Health filter** | options enumerated in `profile\u002Fdiet.md` (\"Health filter input options\" section) plus `no preference` | N (default no preference) |\n| Budget cap | User-supplied cap \u002F no cap | N |\n| Avoid recent | Last 30 \u002F 60 \u002F 90 days | N (default 30) |\n\n## Step 2: Load data (parallel)\n\nResolve the following roles through `profile\u002Fdiet.md § Catalog files`. Paths are relative to `$OV` unless absolute. If the profile or a mapping is absent, use structural discovery under `\u003Cpaths.travel>\u002F` and `\u003Cpaths.finance>\u002F` as a fallback and disclose the gap.\n\n- Regional dining catalog (rotation + Michelin wishlist + 场景索引 + `门店索引`), under `\u003Cpaths.travel>\u002F`\n- Meal-history tracker (history with 评分 + 再去 + recency), under `\u003Cpaths.travel>\u002F`\n- Credit-perks dining catalog (eligibility + city catalogs), under `\u003Cpaths.travel>\u002F`\n- Benefits tracker (current cycle credit status, for burn signal), under `\u003Cpaths.finance>\u002F`\n- Prepaid-balance tracker (balances per restaurant, for a soft \"use it\" signal), under `\u003Cpaths.finance>\u002F`\n- For travel destinations: use the matching city section plus the corresponding local guide under `\u003Cpaths.archive>\u002Fpractical\u002Ftravel\u002F`\n\n**Missing-file fallback:** if any of these is absent, skip it silently and note the gap in the closing line (\"scored without [missing source]\"). The recommendation still produces; the user can decide whether to recreate the catalog.\n\n**Log-side aggregates (deterministic):** run\n`uv run scripts\u002Fdine_rank.py --avoid-days \u003Cwindow>` first; it returns\nper-restaurant visit counts, last-visit recency, `评分` averages, `再去`\nstate, the log-derived score component, and the avoid-window exclusions.\nDo not re-read the meal-history tracker row by row; combine the returned\n`log_score` with the catalog-side factors below.\n\n**Integrity preflight:** when running from the Atelier repo, execute `python3 scripts\u002Fdining_audit.py --json`. Use its `establishments` rows as the address\u002Flifecycle source. If it reports errors, exclude the affected rows or source from scoring and disclose the degraded input. Warnings such as missing legacy values do not block recommendations.\n\n## Step 3: Filter + score\n\n**Hard filters** (eliminate non-matches):\n- Location matches user's region\n- Cuisine NOT in avoid list\n- Estimated price ≤ budget cap (allow 20% margin)\n- Drive time fits time budget (heuristic: ? count × 15min one-way)\n- For Quick lunch: ⌛ ≤ 1\n- For \"Special occasion\": Michelin OR Exclusive Tables only\n- Skip restaurants visited within `avoid recent` window (from the meal-history tracker)\n- Skip physical branches whose lifecycle is `closed` or `moved`; allow `unknown` only with an explicit lifecycle warning\n\nTreat `(餐厅, 分店)` as establishment identity. Join visit ratings only to an exact branch-specific restaurant name; never assign a chain-wide or legacy ambiguous score to a branch by inference.\n\n**Soft ranking** (order the survivors). `dine_rank.py` owns the log-side\nscore (`log_score`, itemized in `log_score_parts`: 评分 averages, 再去, rusty\nrecency); take it verbatim. Then apply the catalog-side priorities, strongest\nfirst:\n\n1. **Credit-burn priority:** an Exclusive Tables restaurant whose relevant cycle\n   has unused credit and ≤ 60 days to deadline outranks everything else.\n2. Michelin star match when the mood is \"Special occasion\".\n3. Catalog 评 (higher first) and a 场景索引 match in the regional catalog.\n4. Novelty: never visited when the mood is \"Surprise\" or \"探索\"; old-favorite\n   revisit when rotation 评 ≥ 2 and `days_since` > 60 from dine_rank.\n5. **Health filter active:** apply the \"Health-filter scoring rules\" section of\n   `profile\u002Fdiet.md` (recent-visit penalties, clean-style bonuses,\n   cumulative-load adjustments) as exclusions and tie-breakers.\n\nExact weights, if wanted, belong in `dine_rank.py` beside `log_score`.\n\n## Step 4: Output\n\nTop 3 candidates as a table:\n\n```markdown\n| # | 餐厅 | 类型 | $ | 距离·等待 | Why | Credit signal |\n|---|---|---|---|---|---|---|\n| 1 | \u003Crestaurant-A> | \u003Ccuisine> | \u003C$range> | \u003Cdistance·wait> | \u003Creason from catalog\u002Flog: 评 N + scene fit + recency> | n\u002Fa |\n| 2 | \u003Crestaurant-B> | \u003Ccuisine> ⭐ | \u003C$range> | \u003Cdistance·wait> | \u003Creason: Michelin tier + last log rating + want-revisit>; **\u003Ccredit-card> \u003Cperk-program> \u003Chalf> deadline \u003CMM\u002FDD> ($\u003Camount>)** | ? burn |\n| 3 | \u003Crestaurant-C> | \u003Ccuisine> ⭐ | \u003C$range> | \u003Cdistance·wait> | \u003Creason: novelty + Michelin tier + perk-eligible>; \u003Cperk-program> 候选 | \u003Ccredit-card> \u003Chalf> ✓ available |\n```\n\nBrief reasoning paragraph (2-3 lines) below the table:\n- Mention the top filter constraints applied\n- Flag any credit-burn 紧迫性 in plain text\n- If filter returned \u003C3 candidates, note relaxation taken (e.g., \"loosened distance to ??\")\n\n## Step 5: Close\n\nEnd with one line:\n> \"选哪个? (回 1\u002F2\u002F3) 我帮你在常用 booking platforms 查时段, 或者 \u002Fdine + 新约束 重排\"\n\nDo NOT auto-book; just surface candidates.\n\n## Intent B: Workplace Catering Tracker\n\n### B.1 Resolve PDF\n\n- If an arg is a `.pdf` path → use it directly.\n- Else: resolve the slug's `Folder` from `profile\u002Fdiet.md`, list `\u003CFolder>\u002F*.pdf`, and pick the one whose filename date range covers the current calendar week. Typical filename pattern: `\u003CWorkplace> Catering_\u003CMon> \u003CDD>-\u003CMon> \u003CDD>.pdf`. If multiple match (e.g., manual override), prefer the most recent `mtime`.\n- Optional date arg `YYYY-MM-DD` shifts the target week (Mon of that week).\n- 0 matches: report `本周菜单还没传到 \u003Cconfigured folder>` and exit cleanly.\n\n### B.2 Parse menu\n\nRead the PDF (`Read` tool). Extract per-day sections (Mon\u002FTue\u002FWed\u002FThu\u002FFri). Each day has a theme + items + dietary tags (`v` \u002F `vg` \u002F `mwgci`).\n\n### B.3 Determine attendance days\n\nRead attendance pattern from `profile\u002Fdiet.md` (the section matching the resolved `\u003Cslug>`, key: `Attendance days`). Override via the second CLI arg:\n- `all` → all 5 weekdays present in the PDF\n- `\u003Cday-codes>` → custom set (case-insensitive day codes; any combination)\n\nIf `profile\u002Fdiet.md` is absent or has no entry for `\u003Cslug>` → ask the user once, do not assume a default. Map each chosen day code to an absolute date based on the resolved week.\n\n### B.4 Pick per day (reuse Step 3 health-filter logic)\n\nRead **dietary picking priorities** and **flag taxonomy** from `profile\u002Fdiet.md` (the `\u003Cslug>` section). Apply the policy verbatim — do not bake personal preferences into this committed file.\n\nGeneric fallback when `profile\u002Fdiet.md` is absent: choose ONE protein + 1-2 veg sides per day, no specific oil\u002Fprotein bias, and ask the user to confirm the picks before presenting.\n\nThe skill itself enforces only the structural shape (one row per attendance day, columns: protein + veg + sauce-note + flag). The semantic content is policy from the private file.\n\n### B.5 Preview\n\nShow table (one row per attendance day; values fill from B.4):\n\n```markdown\n| Date | Day | Theme | Pick | Flag |\n|---|---|---|---|---|\n| YYYY-MM-DD | \u003Cday> | \u003Cmenu theme> | \u003Cprotein> + \u003Cveg sides> + \u003Csauce\u002Fdressing note> | \u003Cflag from profile\u002Fdiet.md taxonomy> |\n```\n\nAdd a 1-2 line cross-day note if `profile\u002Fdiet.md` defines cross-day rules (e.g., protein rotation, 油脂 balance). Otherwise omit.\n\n### B.6 Present\n\nShow the user the per-day picks as ready-to-paste lines so they can record them in their daily notes themselves. The system does not write to daily notes.\n\nFor each attendance day, output one line in the format:\n`\u003CSlug> \u003CYYYY-MM-DD> — \u003CDay> \u003Ctheme> (\u003Cpick>, \u003Cflag>)` where `\u003CSlug>` is the user-provided slug capitalized (first letter only).\n\n### B.7 Report\n\n```\n\u002Fdine \u003Cslug> summary (\u003Cweek-range>)\n  picks:  N   (date list)\n```\n\n## Intent C: Meal Log Capture\n\n`protocols\u002Fdining-capture.md` owns this path: source resolution, catalog\ncross-checks, explicit trip context, auto-derivation, the side-effect plan,\nthe confirmation gate, and the write and report steps. Read it and follow it.\nIt is shared with `\u002Fhi` Dining Pulse, which is why it is not inline here.\n\n## Intent D: Establishment Update\n\nUse this path for address or lifecycle maintenance without inventing a visit.\n\n1. Resolve the regional catalog from `profile\u002Fdiet.md`, then find an exact `(餐厅, 分店)` row in `门店索引`.\n2. Accept only lifecycle values `active`, `closed`, `moved`, or `unknown`. Require a complete street address for a new row. Preserve an existing address unless the user explicitly changes it.\n3. Show the current row and proposed row, then ask one confirmation: `Apply establishment update? (yes \u002F no \u002F edit)`.\n4. On `yes`, update or append exactly one registry row, set `核验日` to the local effective date, record the source without copying private prose, and bump the catalog's `Last updated:` line.\n5. Run `python3 scripts\u002Fdining_audit.py --json`. Repair only the introduced row if validation fails; otherwise report one line: `Updated: \u003Crestaurant> (\u003Cbranch>) → \u003Cstatus>.`\n\nDo not add a meal-history row, change ratings, or infer that another branch shares this lifecycle.\n\n## Rules\n\nIntent A:\n- **Read-only on catalog docs (under Intent A)**: do NOT modify the regional dining catalog or the credit-perks catalog when handling a recommendation request. The meal-history tracker is also read-only under Intent A; appends route through Intent C (or `\u002Fhi` Dining Pulse).\n- **0 candidates after hard filter**: relax most-restrictive constraint by 1 step, retry; surface 1-2 closest matches with flag \"relaxed: \u003Cconstraint>\"\n- **Always show credit-burn opportunity** if relevant under the live private benefits tracker. Even if the eligible restaurant does not match the exact mood, surface a fourth line using only the currently relevant benefit details.\n- **Match user language**: Chinese-dominant if cuisine is Chinese; English if Western\n- **Shape**: the candidate table, a short reasoning paragraph, one close line. Nothing else.\n- **No web search**: cuisine + restaurant data comes from local catalog files only\n\nIntent B:\n- **Read-only on the PDF**: never modify the catering PDF\n- **Read-only on daily notes**: daily notes are user-authored; the system surfaces picks for the user to record themselves and never writes to `\u003Cpaths.daily_notes>\u002F`\n- **Does not touch the meal-history tracker**: workplace catering is excluded by design (low signal density per memory)\n- **Per-day skip on parse failure**: if any one day's section fails to parse, skip that day with a logged warning; do not abort the whole batch\n- **No web search**: menu data comes from the PDF only\n","## Purpose\n\nFour intents (auto-detected from args):\n- **A. Restaurant Recommendation** (default): pick 3 restaurant candidates based on user-supplied context, historical preferences, and credit-burn opportunities. Read-only on catalog docs under this intent.\n- **B. Workplace Catering Tracker**: parse a weekly catering PDF from the folder mapped to a workplace slug in `profile\u002Fdiet.md`, choose health-aware picks for the user's attendance days, and surface a confirmed table for the user to record themselves (the system does not write to daily notes).\n- **C. Meal Log Capture** (ad-hoc): log a meal the user just ate. Parses receipt images (HEIC\u002FJPG\u002FPNG\u002FPDF) when provided, cross-references catalogs for missing slots, asks ONE compact question for what cannot be derived, shows a draft row + side-effect plan, and appends to the private meal-history tracker on confirm. An explicitly trip-associated capture may also add a date-only meal-history reference to that trip note. Co-equal capture path with `\u002Fhi` Dining Pulse.\n- **D. Establishment Update**: update one physical branch's address or lifecycle without creating a meal-history row.\n\n## Quick start\n\nIntent A examples:\n- `\u002Fdine` → ask all context\n- `\u002Fdine 工作日午餐` → use as scene hint, ask remaining\n- `\u002Fdine 朋友 4 人 川菜 dinner` → use as filters, ask remaining\n- `\u002Fdine \u003Ccity> burn credit` → location hint + flag credit-burn priority\n\nIntent B examples (first arg = workplace slug mapped in gitignored `profile\u002Fdiet.md`):\n- `\u002Fdine \u003Cslug>` → find the latest PDF in the mapped catering folder covering this week, pick per `profile\u002Fdiet.md` attendance pattern\n- `\u002Fdine \u003Cslug> \u003Cpdf-path>` → explicit PDF\n- `\u002Fdine \u003Cslug> all` → all 5 weekdays (override)\n- `\u002Fdine \u003Cslug> \u003Cday-codes>` → custom attendance set (override; any day-code combination works)\n\nIntent C examples (logging a meal you just ate):\n- `\u002Fdine log 今天午饭吃的 \u003Crestaurant> 两人 $\u003Camount>` → free-text meal report\n- `\u002Fdine 今天晚饭吃的是 \u002Fpath\u002Fto\u002Freceipt.heic` → receipt image (HEIC auto-converted before Read)\n- `\u002Fdine 昨天 \u003Crestaurant> dinner $\u003Camount>` → dated free text (respects late-sleep rule)\n- `\u002Fdine log \u002Fpath\u002Fto\u002Freceipt.pdf` → receipt PDF outside any catering folder\n\nIntent D examples (maintaining a physical branch):\n- `\u002Fdine status \u003Crestaurant> \u003Cbranch> closed`\n- `\u002Fdine status \u003Crestaurant> \u003Cbranch> moved \u003Cnew-address>`\n\nIf args present, parse them as initial filters; only ask for slots not derivable.\n\n## Step 0: Intent detection\n\nParse args. Precedence: **D → B → C → A** (most specific match wins; ambiguous → ask user one line before routing).\n\nRead `profile\u002Fdiet.md` once, if present, to resolve workplace slugs, catering folders, and `## Catalog files`. Do not assume the private mappings from examples in this command.\n\nRoute to **Intent D** when the leading subcommand is `status`.\n\nElse route to **Intent B** if any of:\n- First arg matches a workplace `Slug` declared in `profile\u002Fdiet.md`\n- Any arg is a `.pdf` path under a catering `Folder` declared in `profile\u002Fdiet.md`\n- Args contain the literal token `catering`\n\nElse route to **Intent C** if any of:\n- Leading subcommand `log` (e.g., `\u002Fdine log \u003Cfreetext>`)\n- Args contain past-tense \u002F reporting markers: `记录` \u002F `log` \u002F `吃了` \u002F `吃的` \u002F `刚吃完` \u002F \"今天X吃的\" \u002F \"昨天Y\" \u002F \"just had\"\n- An image path (`.heic` \u002F `.jpg` \u002F `.jpeg` \u002F `.png`) is provided\n- A `.pdf` path is provided **outside** any `$OV\u002F*\u002Fcatering\u002F` folder\n- Free text mentions a specific restaurant + amount\u002Fparty (e.g., `\u003Cname> 两人 $\u003Camount>`) without a forward-looking verb\n\nDo NOT route to C if the message is forward-looking: contains `推荐` \u002F `去哪吃` \u002F `想吃` \u002F `what should I eat` \u002F `where to eat` \u002F `今晚吃什么` → fall through to A.\n\nOtherwise route to **Intent A** (continue to Step 1 below).\n\nFor Intent B, jump to the \"Intent B: Workplace Catering Tracker\" section near the bottom and skip Steps 1-5.\nFor Intent C, read `protocols\u002Fdining-capture.md` and follow it; skip Steps 1-5.\nFor Intent D, jump to the \"Intent D: Establishment Update\" section near the bottom and skip Steps 1-5.\n\n## Step 1: Gather context\n\nFor missing slots, ask via `AskUserQuestion` or sequential 1-line prompts (whichever fits faster). Required slots first; optional slots only if useful.\n\n| Slot | Options | Required |\n|---|---|---|\n| **Location** | Home region \u002F nearby city \u002F travel destination \u002F other | Y |\n| **Party** | Solo \u002F Partner \u002F Family (N) \u002F Friends (N) \u002F Mixed work | Y |\n| **Meal** | Lunch \u002F Dinner \u002F Brunch \u002F Late night | Y |\n| **Time budget** | Quick (\u003C30min) \u002F Standard (1-2h) \u002F Leisurely (2h+) | Y |\n| Mood \u002F cuisine | Free text or options declared in `profile\u002Fdiet.md` | N (default any) |\n| **Health filter** | options enumerated in `profile\u002Fdiet.md` (\"Health filter input options\" section) plus `no preference` | N (default no preference) |\n| Budget cap | User-supplied cap \u002F no cap | N |\n| Avoid recent | Last 30 \u002F 60 \u002F 90 days | N (default 30) |\n\n## Step 2: Load data (parallel)\n\nResolve the following roles through `profile\u002Fdiet.md § Catalog files`. Paths are relative to `$OV` unless absolute. If the profile or a mapping is absent, use structural discovery under `\u003Cpaths.travel>\u002F` and `\u003Cpaths.finance>\u002F` as a fallback and disclose the gap.\n\n- Regional dining catalog (rotation + Michelin wishlist + 场景索引 + `门店索引`), under `\u003Cpaths.travel>\u002F`\n- Meal-history tracker (history with 评分 + 再去 + recency), under `\u003Cpaths.travel>\u002F`\n- Credit-perks dining catalog (eligibility + city catalogs), under `\u003Cpaths.travel>\u002F`\n- Benefits tracker (current cycle credit status, for burn signal), under `\u003Cpaths.finance>\u002F`\n- Prepaid-balance tracker (balances per restaurant, for a soft \"use it\" signal), under `\u003Cpaths.finance>\u002F`\n- For travel destinations: use the matching city section plus the corresponding local guide under `\u003Cpaths.archive>\u002Fpractical\u002Ftravel\u002F`\n\n**Missing-file fallback:** if any of these is absent, skip it silently and note the gap in the closing line (\"scored without [missing source]\"). The recommendation still produces; the user can decide whether to recreate the catalog.\n\n**Log-side aggregates (deterministic):** run\n`uv run scripts\u002Fdine_rank.py --avoid-days \u003Cwindow>` first; it returns\nper-restaurant visit counts, last-visit recency, `评分` averages, `再去`\nstate, the log-derived score component, and the avoid-window exclusions.\nDo not re-read the meal-history tracker row by row; combine the returned\n`log_score` with the catalog-side factors below.\n\n**Integrity preflight:** when running from the Atelier repo, execute `python3 scripts\u002Fdining_audit.py --json`. Use its `establishments` rows as the address\u002Flifecycle source. If it reports errors, exclude the affected rows or source from scoring and disclose the degraded input. Warnings such as missing legacy values do not block recommendations.\n\n## Step 3: Filter + score\n\n**Hard filters** (eliminate non-matches):\n- Location matches user's region\n- Cuisine NOT in avoid list\n- Estimated price ≤ budget cap (allow 20% margin)\n- Drive time fits time budget (heuristic: ? count × 15min one-way)\n- For Quick lunch: ⌛ ≤ 1\n- For \"Special occasion\": Michelin OR Exclusive Tables only\n- Skip restaurants visited within `avoid recent` window (from the meal-history tracker)\n- Skip physical branches whose lifecycle is `closed` or `moved`; allow `unknown` only with an explicit lifecycle warning\n\nTreat `(餐厅, 分店)` as establishment identity. Join visit ratings only to an exact branch-specific restaurant name; never assign a chain-wide or legacy ambiguous score to a branch by inference.\n\n**Soft ranking** (order the survivors). `dine_rank.py` owns the log-side\nscore (`log_score`, itemized in `log_score_parts`: 评分 averages, 再去, rusty\nrecency); take it verbatim. Then apply the catalog-side priorities, strongest\nfirst:\n\n1. **Credit-burn priority:** an Exclusive Tables restaurant whose relevant cycle\n   has unused credit and ≤ 60 days to deadline outranks everything else.\n2. Michelin star match when the mood is \"Special occasion\".\n3. Catalog 评 (higher first) and a 场景索引 match in the regional catalog.\n4. Novelty: never visited when the mood is \"Surprise\" or \"探索\"; old-favorite\n   revisit when rotation 评 ≥ 2 and `days_since` > 60 from dine_rank.\n5. **Health filter active:** apply the \"Health-filter scoring rules\" section of\n   `profile\u002Fdiet.md` (recent-visit penalties, clean-style bonuses,\n   cumulative-load adjustments) as exclusions and tie-breakers.\n\nExact weights, if wanted, belong in `dine_rank.py` beside `log_score`.\n\n## Step 4: Output\n\nTop 3 candidates as a table:\n\n```markdown\n| # | 餐厅 | 类型 | $ | 距离·等待 | Why | Credit signal |\n|---|---|---|---|---|---|---|\n| 1 | \u003Crestaurant-A> | \u003Ccuisine> | \u003C$range> | \u003Cdistance·wait> | \u003Creason from catalog\u002Flog: 评 N + scene fit + recency> | n\u002Fa |\n| 2 | \u003Crestaurant-B> | \u003Ccuisine> ⭐ | \u003C$range> | \u003Cdistance·wait> | \u003Creason: Michelin tier + last log rating + want-revisit>; **\u003Ccredit-card> \u003Cperk-program> \u003Chalf> deadline \u003CMM\u002FDD> ($\u003Camount>)** | ? burn |\n| 3 | \u003Crestaurant-C> | \u003Ccuisine> ⭐ | \u003C$range> | \u003Cdistance·wait> | \u003Creason: novelty + Michelin tier + perk-eligible>; \u003Cperk-program> 候选 | \u003Ccredit-card> \u003Chalf> ✓ available |\n```\n\nBrief reasoning paragraph (2-3 lines) below the table:\n- Mention the top filter constraints applied\n- Flag any credit-burn 紧迫性 in plain text\n- If filter returned \u003C3 candidates, note relaxation taken (e.g., \"loosened distance to ??\")\n\n## Step 5: Close\n\nEnd with one line:\n> \"选哪个? (回 1\u002F2\u002F3) 我帮你在常用 booking platforms 查时段, 或者 \u002Fdine + 新约束 重排\"\n\nDo NOT auto-book; just surface candidates.\n\n## Intent B: Workplace Catering Tracker\n\n### B.1 Resolve PDF\n\n- If an arg is a `.pdf` path → use it directly.\n- Else: resolve the slug's `Folder` from `profile\u002Fdiet.md`, list `\u003CFolder>\u002F*.pdf`, and pick the one whose filename date range covers the current calendar week. Typical filename pattern: `\u003CWorkplace> Catering_\u003CMon> \u003CDD>-\u003CMon> \u003CDD>.pdf`. If multiple match (e.g., manual override), prefer the most recent `mtime`.\n- Optional date arg `YYYY-MM-DD` shifts the target week (Mon of that week).\n- 0 matches: report `本周菜单还没传到 \u003Cconfigured folder>` and exit cleanly.\n\n### B.2 Parse menu\n\nRead the PDF (`Read` tool). Extract per-day sections (Mon\u002FTue\u002FWed\u002FThu\u002FFri). Each day has a theme + items + dietary tags (`v` \u002F `vg` \u002F `mwgci`).\n\n### B.3 Determine attendance days\n\nRead attendance pattern from `profile\u002Fdiet.md` (the section matching the resolved `\u003Cslug>`, key: `Attendance days`). Override via the second CLI arg:\n- `all` → all 5 weekdays present in the PDF\n- `\u003Cday-codes>` → custom set (case-insensitive day codes; any combination)\n\nIf `profile\u002Fdiet.md` is absent or has no entry for `\u003Cslug>` → ask the user once, do not assume a default. Map each chosen day code to an absolute date based on the resolved week.\n\n### B.4 Pick per day (reuse Step 3 health-filter logic)\n\nRead **dietary picking priorities** and **flag taxonomy** from `profile\u002Fdiet.md` (the `\u003Cslug>` section). Apply the policy verbatim — do not bake personal preferences into this committed file.\n\nGeneric fallback when `profile\u002Fdiet.md` is absent: choose ONE protein + 1-2 veg sides per day, no specific oil\u002Fprotein bias, and ask the user to confirm the picks before presenting.\n\nThe skill itself enforces only the structural shape (one row per attendance day, columns: protein + veg + sauce-note + flag). The semantic content is policy from the private file.\n\n### B.5 Preview\n\nShow table (one row per attendance day; values fill from B.4):\n\n```markdown\n| Date | Day | Theme | Pick | Flag |\n|---|---|---|---|---|\n| YYYY-MM-DD | \u003Cday> | \u003Cmenu theme> | \u003Cprotein> + \u003Cveg sides> + \u003Csauce\u002Fdressing note> | \u003Cflag from profile\u002Fdiet.md taxonomy> |\n```\n\nAdd a 1-2 line cross-day note if `profile\u002Fdiet.md` defines cross-day rules (e.g., protein rotation, 油脂 balance). Otherwise omit.\n\n### B.6 Present\n\nShow the user the per-day picks as ready-to-paste lines so they can record them in their daily notes themselves. The system does not write to daily notes.\n\nFor each attendance day, output one line in the format:\n`\u003CSlug> \u003CYYYY-MM-DD> — \u003CDay> \u003Ctheme> (\u003Cpick>, \u003Cflag>)` where `\u003CSlug>` is the user-provided slug capitalized (first letter only).\n\n### B.7 Report\n\n```\n\u002Fdine \u003Cslug> summary (\u003Cweek-range>)\n  picks:  N   (date list)\n```\n\n## Intent C: Meal Log Capture\n\n`protocols\u002Fdining-capture.md` owns this path: source resolution, catalog\ncross-checks, explicit trip context, auto-derivation, the side-effect plan,\nthe confirmation gate, and the write and report steps. Read it and follow it.\nIt is shared with `\u002Fhi` Dining Pulse, which is why it is not inline here.\n\n## Intent D: Establishment Update\n\nUse this path for address or lifecycle maintenance without inventing a visit.\n\n1. Resolve the regional catalog from `profile\u002Fdiet.md`, then find an exact `(餐厅, 分店)` row in `门店索引`.\n2. Accept only lifecycle values `active`, `closed`, `moved`, or `unknown`. Require a complete street address for a new row. Preserve an existing address unless the user explicitly changes it.\n3. Show the current row and proposed row, then ask one confirmation: `Apply establishment update? (yes \u002F no \u002F edit)`.\n4. On `yes`, update or append exactly one registry row, set `核验日` to the local effective date, record the source without copying private prose, and bump the catalog's `Last updated:` line.\n5. Run `python3 scripts\u002Fdining_audit.py --json`. Repair only the introduced row if validation fails; otherwise report one line: `Updated: \u003Crestaurant> (\u003Cbranch>) → \u003Cstatus>.`\n\nDo not add a meal-history row, change ratings, or infer that another branch shares this lifecycle.\n\n## Rules\n\nIntent A:\n- **Read-only on catalog docs (under Intent A)**: do NOT modify the regional dining catalog or the credit-perks catalog when handling a recommendation request. The meal-history tracker is also read-only under Intent A; appends route through Intent C (or `\u002Fhi` Dining Pulse).\n- **0 candidates after hard filter**: relax most-restrictive constraint by 1 step, retry; surface 1-2 closest matches with flag \"relaxed: \u003Cconstraint>\"\n- **Always show credit-burn opportunity** if relevant under the live private benefits tracker. Even if the eligible restaurant does not match the exact mood, surface a fourth line using only the currently relevant benefit details.\n- **Match user language**: Chinese-dominant if cuisine is Chinese; English if Western\n- **Shape**: the candidate table, a short reasoning paragraph, one close line. Nothing else.\n- **No web search**: cuisine + restaurant data comes from local catalog files only\n\nIntent B:\n- **Read-only on the PDF**: never modify the catering PDF\n- **Read-only on daily notes**: daily notes are user-authored; the system surfaces picks for the user to record themselves and never writes to `\u003Cpaths.daily_notes>\u002F`\n- **Does not touch the meal-history tracker**: workplace catering is excluded by design (low signal density per memory)\n- **Per-day skip on parse failure**: if any one day's section fails to parse, skip that day with a logged warning; do not abort the whole batch\n- **No web search**: menu data comes from the PDF only\n",{"name":5,"description":7},"main","a51840b1178787402a2853bf8c6d033f684a6cb3","skills\u002Fdine",1,"https:\u002F\u002Fgithub.com\u002Fmhxie\u002FAtelier","https:\u002F\u002Fgithub.com\u002Fmhxie","mhxie.us","AI Infra Scaler","2026-10-19 14:24:57",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add mhxie\u002FAtelier --skill dine",{"tool":45,"command":46},"bunx","bunx skills add mhxie\u002FAtelier --skill dine",{"tool":48,"command":49},"pnpm","pnpm dlx skills add mhxie\u002FAtelier --skill dine","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmhxie\u002FAtelier\u002Fblob\u002Fmain\u002Fskills\u002Fdine\u002FSKILL.md",true,[],[54,71,85,96,105,119],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":25},"01M6J7T9CJ5JKHB39YGP1DW3G4","weekly","Weekly review of patterns, commitments, health follow-ups, and next-week priorities; life check-ins are contextual.","https:\u002F\u002Fgithub.com\u002Fmhxie\u002FAtelier\u002Fblob\u002Fmain\u002Fskills\u002Fweekly\u002FSKILL.md",[],[56,61,62,63,64,65,66,67,68,69,70],"review","health","weekly review","check","patterns","next","priorities","life","follow-ups","commitments",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":25},"01M6J7T6JSWKCFR58W91EJN531","triage","Unified operational review center with a read-only overview and bounded review batches.","https:\u002F\u002Fgithub.com\u002Fmhxie\u002FAtelier\u002Fblob\u002Fmain\u002Fskills\u002Ftriage\u002FSKILL.md",[],[73,61,78,79,80,81,82,83,84],"read","overview","only","with","read-only","batches","bounded",{"skillNo":86,"name":61,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":25},"01M6J7T3C7GW62Y6HBY08SP2J2","Goal review for quarterly full reviews and monthly light pulses.","https:\u002F\u002Fgithub.com\u002Fmhxie\u002FAtelier\u002Fblob\u002Fmain\u002Fskills\u002Freview\u002FSKILL.md",[],[61,91,92,93,94,95],"monthly","for","goal","full","reviews",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":25},"01M6J7T100EXCAMH8CKT4T9W3J","reflect","Alias of \u002Fhi.","https:\u002F\u002Fgithub.com\u002Fmhxie\u002FAtelier\u002Fblob\u002Fmain\u002Fskills\u002Freflect\u002FSKILL.md",[],[98,103,104],"alias","hi",{"skillNo":106,"name":78,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":25},"01M6J7SX4EJP01DP385ST64W8A","Read and discuss a source with one reading worker; expand perspectives, evidence gathering, or review when the task needs it.","https:\u002F\u002Fgithub.com\u002Fmhxie\u002FAtelier\u002Fblob\u002Fmain\u002Fskills\u002Fread\u002FSKILL.md",[],[78,111,61,112,113,114,115,116,81,117,118],"expand","perspectives","evidence","task","worker","it","reading","source",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":25},"01M6J7STCDVAE48E5B60XNJ0BK","push","Publish local commits after both privacy gates pass over the whole unpushed range.","https:\u002F\u002Fgithub.com\u002Fmhxie\u002FAtelier\u002Fblob\u002Fmain\u002Fskills\u002Fpush\u002FSKILL.md",[],[121,126,127,128,21,129],"publish","privacy","commits","gates"]