[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AVCY2C47SDN2GSA3PKKW98":3,"skill-same:01M7AVCY2C47SDN2GSA3PKKW98":83},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":14,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":40,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M7AVCY2C47SDN2GSA3PKKW98","feishu-docs",null,"Use when reading or writing Feishu\u002FLark docs and wiki via API, including doc comments.","peterlau123\u002Fskills-you-need","peterlau123","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F19188200?v=4","01M7AV0Y55C30Y4E2TGRQ8X7WR","Sloth","01M7AV0Y5SNAJQ4E3FG1EEK8S4",0,"MIT","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fproductivity\u002Ffeishu-docs\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: feishu-docs\ndescription: \"Use when reading or writing Feishu\u002FLark docs and wiki via API, including doc comments.\"\nversion: 1.2.0\nlicense: MIT\nmetadata:\n  hermes:\n    tags: [feishu, lark, docs, api, drive, upload, write, create]\n---\n\n# Feishu \u002F Lark Docs Access (mx001, ai-engineer profile)\n\nUse when the user pastes a Feishu\u002FLark doc link (`https:\u002F\u002F\u003Ctenant>.feishu.cn\u002Fwiki\u002F\u003Ctoken>`,\n`\u002Fdocx\u002F\u003Ctoken>`, `\u002Fdocs\u002F\u003Ctoken>`) and asks to read\u002Fsummarize it, or asks to upload artifacts to\nFeishu cloud space. Reply in Chinese — the user works in a Feishu workspace.\n\n## Tool limitation first\n\nThe following deferred-catalog plugin tools only work **in a doc-comment context** (i.e. when\nthe gateway delivered a comment event to the agent); in a plain DM they all fail with\n\"Feishu client not available (not in a Feishu comment context)\":\n\n- `feishu_doc_read` — read doc content\n- `feishu_drive_list_comments` — list comments on a doc\n- `feishu_drive_reply_comment` — reply to a local (quoted-text) comment thread\n- `feishu_drive_add_comment` — add a whole-document comment\n- `feishu_drive_list_comment_replies` — list replies in a comment thread\n\nDo NOT retry any of these in a loop — fall through to the direct API paths below. When the user\nsays \"我在文档里评论了\" or \"回复文档评论\", go straight to the **Doc comments (read & reply from\nDM)** section.\n\n## Credentials on this machine\n\n- **Read scopes live on the janus app**: `~\u002F.hermes\u002Fprofiles\u002Fjanus-model-adapt\u002Fsecrets\u002Ffeishu_app.json`\n  (app `cli_aae7…`, provisioned 2026-08-05, doc read scopes enabled). The user approved its use\n  for doc reads; copy it to `~\u002F.hermes\u002Fprofiles\u002F\u003Cprofile>\u002Fsecrets\u002Ffeishu_app.json` (chmod 600)\n  when the active profile lacks one.\n- **Write scopes live on the chat-gateway bot**: the app `cli_aa95…` (creds `FEISHU_APP_ID` \u002F\n  `FEISHU_APP_SECRET` in the profile `.env`) has `docx:document` + `docx:document:create`\n  (verified 2026-08-06: create doc + write blocks succeeded with it), while the janus app\n  still returns `code: 99991672` on write calls.\n- **Two-app split is the norm on this machine**: read with the janus app, write with the chat bot.\n  If one app fails a call with `99991672`, switch to the OTHER app's credentials before asking the\n  user to grant scopes — the user may have granted them to the app you're not using.\n- Never write app_secret to memory or echo it in chat.\n\n## API read flow (app creds → doc text)\n\n1. `POST https:\u002F\u002Fopen.feishu.cn\u002Fopen-apis\u002Fauth\u002Fv3\u002Ftenant_access_token\u002Finternal` with\n   `{\"app_id\":…,\"app_secret\":…}` → `tenant_access_token`.\n2. **Wiki links need two-step resolution**: the URL token is the *wiki node* token. Call\n   `GET \u002Fopen-apis\u002Fwiki\u002Fv2\u002Fspaces\u002Fget_node?token=\u003Curl-token>` → `obj_token` (+ `obj_type`, usually\n   `docx`) before reading.\n3. Read content: `GET \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments\u002F\u003Cobj_token>\u002Fraw_content` (docx) — returns plain\n   text. Legacy `\u002Fdocs\u002F` tokens use the docx API too after resolution.\n4. **If `obj_type` is `file`** (not `docx`): the `obj_token` is a drive file token, NOT a docx\n   document ID. The docx `raw_content` API returns `404 \u002F code: 1770002 \"not found\"`. Use the\n   **Drive file download** flow below instead — `GET \u002Fopen-apis\u002Fdrive\u002Fv1\u002Ffiles\u002F\u003Cobj_token>\u002Fdownload`.\n   This happens when a .docx\u002F.pptx\u002F.pdf is uploaded as a file attachment to a wiki node rather\n   than created as a native Feishu doc.\n\n## IM message read (recover full bot-delivered text — cron responses, alerts)\n\nWhen a user replies to a bot-delivered message (e.g. a cron job response) and you need the FULL\ntext — the Feishu reply quote is truncated, and the local store (cron jobs.db\u002Foutput, session DB,\ngateway logs) may be wiped\u002Fempty — fetch the original message from the IM API:\n\n- **Which app**: the chat-gateway bot (`cli_aa95…`, creds `FEISHU_APP_ID` \u002F `FEISHU_APP_SECRET` in\n  the profile `.env`). The janus read app (`cli_aae7…`) is NOT a member of DMs and fails with\n  `code 230002 \"Bot\u002FUser can NOT be out of the chat\"` on IM calls.\n- **Which ID**: in a DM, the session-key thread token (the `:om_...` suffix, e.g.\n  `agent:main:feishu:dm:\u003Cchat_id>:om_x100...`) IS the `message_id` of the message the user replied\n  to (gateway logs it as `reply_to_id`). Fetch it directly — no list call needed.\n- **Call**: `GET \u002Fopen-apis\u002Fim\u002Fv1\u002Fmessages\u002F\u003Cmessage_id>` with\n  `Authorization: Bearer \u003Ctenant_access_token>`.\n- **Parse**: `msg_type` is usually `post`; `data.items[0].body.content` is JSON with `content`\n  (rich segment array) and `content_v2` (clean markdown array). Read `content_v2[0].text` for the\n  full readable markdown.\n\n## Automated comment event handling (gateway-side auto-reply)\n\nThe Hermes Feishu adapter can auto-respond to document comments without user DM\nintervention. When a user @mentions the bot in a Feishu document comment, the\ngateway receives a `drive.notice.comment_add_v1` event, runs a comment-agent\nwith `feishu_doc` + `feishu_drive` tools, and posts the reply back to the\ncomment thread.\n\nThis is **separate from the manual API flow** above — it requires gateway-side\nconfiguration and event subscription, not just API credentials.\n\n### Access-control config: `feishu_comment_rules.json`\n\nLocated at `get_hermes_home() \u002F \"feishu_comment_rules.json\"` (profile-specific,\nmtime-cached, hot-reloaded — no restart needed to pick up changes).\n\n```json\n{\n  \"enabled\": true,\n  \"policy\": \"allowlist\",\n  \"allow_from\": [\"ou_\u003Cuser_open_id>\"],\n  \"documents\": {}\n}\n```\n\n- **`policy: \"allowlist\"`** — only users in `allow_from` can trigger the bot.\n  This is the recommended policy for a single-user setup.\n- **`policy: \"pairing\"`** (default when file is missing) — users must be\n  approved via a separate `feishu_comment_pairing.json` store. With no pairing\n  file, **everyone is denied**. This is the most common misconfiguration.\n- **`documents`** — per-document overrides. Keys are `fileType:fileToken`\n  (e.g. `\"docx:LsPNdBQhuo6LD5xq6zjcSQ1hnAd\"`), or `\"*\"` for wildcard. Each\n  field (`enabled`, `policy`, `allow_from`) falls back independently through\n  exact → wildcard → top-level → code defaults.\n\n### Critical pitfall: missing rules file = silent denial\n\nIf `feishu_comment_rules.json` does not exist, the code defaults to\n`CommentsConfig()` → `policy=\"pairing\"` + empty `allow_from`. This silently\ndenies ALL comment events. The gateway log shows:\n\n```\n[Feishu-Comment] User ou_... denied (policy=pairing, rule=top)\n```\n\n**Always create the rules file before testing comment events.** Set\n`policy: \"allowlist\"` with the user's `open_id` in `allow_from`.\n\n### Event flow (for debugging)\n\n1. Feishu websocket delivers `drive.notice.comment_add_v1` event\n2. Adapter dispatches to `handle_drive_comment_event()` in\n   `plugins\u002Fplatforms\u002Ffeishu\u002Ffeishu_comment.py`\n3. Event is parsed; filtered by `to_open_id == bot_open_id` (bot must be\n   @mentioned) and `notice_type in {add_comment, add_reply}`\n4. Access control: `resolve_rule()` + `is_user_allowed()` — denied events\n   are logged and dropped (no reaction, no reply)\n5. If allowed: OK reaction added → parallel fetch (doc meta + comment details)\n   → build prompt → run comment-agent → deliver reply → remove reaction\n\n### Gateway log diagnosis\n\nSearch `~\u002F.hermes\u002Fprofiles\u002F\u003Cprofile>\u002Flogs\u002Fgateway.log` for `Feishu-Comment`:\n\n- `denied (policy=...)` — access control blocked the user; check rules file\n- `handle_drive_comment_event START` — event arrived and was parsed\n- No `Feishu-Comment` entries after a restart — events not arriving at all\n  (check Feishu console event subscription, not a Hermes-side issue)\n\n### Restarting the gateway (pitfall, verified 2026-08-17)\n\n`hermes gateway restart` run **from inside the gateway process** (i.e. from the agent's own\nterminal) is refused: `✗ Refusing to restart the gateway from inside the gateway process. This\ncommand was blocked to prevent restart loops.` The rules file itself hot-reloads (mtime-cached,\nno restart needed), but if a restart IS required (e.g. after .env changes): kill the old PID\nfound in `gateway_state.json` (`kill \u003Cpid>`), wait ~3s, and let the supervisor respawn it — the\nsession reconnects automatically. Verify afterwards with `cat gateway_state.json` →\n`platforms.feishu.state == connected`.\n\nSee `references\u002Ffeishu-comment-events.md` for full config format, rule\nresolution logic, and the comment-agent execution details.\n\n## Doc comments (read & reply from DM)\n\nWhen the user says \"我在文档里评论了\" \u002F \"回复文档评论\" and provides a doc URL, the plugin tools\nwon't work (see Tool limitation above). Use direct API calls instead. Verified 2026-08-17.\n\n### Which app to use\n\n- **List comments + read doc context**: use the **janus read app** (`cli_aae7…`) — it has\n  `drive:drive:readonly` and is already a collaborator on wiki docs the user shared.\n- **Reply to a comment**: use the **chat-bot app** (`cli_aa95…`, creds from `.env`) —\n  the janus app lacks `drive:drive` write scope and returns `99991672` on comment replies.\n  If janus fails on list too, switch to chat-bot (it has read access via `drive:drive`).\n\n### List comments\n\n```\nGET \u002Fopen-apis\u002Fdrive\u002Fv1\u002Ffiles\u002F\u003Cobj_token>\u002Fcomments?file_type=docx&page_size=100\nAuthorization: Bearer \u003Ctenant_access_token>\n```\n\nResponse `data.items[]` key fields:\n- `comment_id` — needed for reply\n- `quote` — the quoted doc text the comment is anchored to (gives context)\n- `is_whole` — `true` = whole-document comment; `false` = anchored to specific text\n- `is_solved` — whether the comment is resolved\n- `reply_list.replies[]` — existing replies; each reply has `content.elements[]` (same\n  structure as block elements: `text_run.text`, `person.user_id`, etc.)\n- `user_id` — comment author's `open_id`\n\n### Read doc context around the comment\n\nAfter listing comments, use the `quote` field to locate the relevant section in the doc:\n\n1. Read raw content: `GET \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments\u002F\u003Cobj_token>\u002Fraw_content`\n2. Search for the `quote` text to find surrounding context and understand what the user\n   is commenting on.\n\n### Reply to a comment\n\n```\nPOST \u002Fopen-apis\u002Fdrive\u002Fv1\u002Ffiles\u002F\u003Cobj_token>\u002Fcomments\u002F\u003Ccomment_id>\u002Freplies?file_type=docx\nAuthorization: Bearer \u003Ctenant_access_token>\nContent-Type: application\u002Fjson\n\nBody:\n{\n  \"content\": {\n    \"elements\": [\n      {\n        \"type\": \"text_run\",\n        \"text_run\": {\"text\": \"回复内容...\"}\n      }\n    ]\n  }\n}\n```\n\n**Critical**: the body must have a flat `content` object with `elements` — NOT wrapped in\n`reply_list`. Wrapping in `{\"reply_list\": {\"replies\": [{\"content\": ...}]}}` returns\n`code: 99992402 \"field validation failed\"` with `\"content is required\"`.\n\nMulti-line text in `text_run.text` is supported — use `\\n` for line breaks.\n\n## Required app scopes (permission management in Feishu console)\n\n- `docx:document:readonly`, `wiki:wiki:readonly`, `drive:drive:readonly` (read)\n- `drive:file:upload` (+ `space:folder:create` for folder creation) (upload)\n- Scopes alone are NOT enough: the app must also be a collaborator (可阅读) on the specific doc, or\n  the wiki space must be visible to it. Missing-scope error `code: 99991672` carries a grant link in\n  `msg` — hand it to the user verbatim.\n\n## Wiki child node creation (sub-documents under a wiki page)\n\nWhen the user asks to create a **child document under an existing wiki page** (e.g. \"在这个文档下面\n新建子文档\"), the flow is different from standalone doc creation.\n\n### The permission wall (critical)\n\nCreating a child wiki node requires **wiki space edit permission**, which is SEPARATE from\n`docx:document` \u002F `docx:document:create` scopes:\n\n- `docx:document` scopes → can create standalone docs in the app's default folder ✓\n- Wiki space edit permission → needed to create child nodes or move docs into wiki ✗\n\nThe bot app (`cli_aa95…`) has docx write scopes but is NOT a wiki space member with edit\npermission. Error: `code: 131006 \"permission denied: node permission denied, tenant needs edit\npermission\"`.\n\n### Relevant APIs\n\n| API | Purpose | Permission needed |\n|---|---|---|\n| `POST \u002Fwiki\u002Fv2\u002Fspaces\u002F{space_id}\u002Fnodes` | Create child wiki node directly | Wiki space edit (`wiki:wiki` or `wiki:node:create` scope + space membership) |\n| `POST \u002Fwiki\u002Fv2\u002Fspaces\u002F{space_id}\u002Fnodes\u002Fmove_docs_to_wiki` | Move standalone docx into wiki tree | Edit permission on the parent node |\n| `GET \u002Fwiki\u002Fv2\u002Fspaces\u002F{space_id}\u002Fmembers` | List wiki space members | Works with read access (view permission) |\n| `GET \u002Fbot\u002Fv3\u002Finfo` | Get bot's own open_id | Token only |\n\n### Two-step resolution (required before any wiki operation)\n\nWiki URLs use node tokens. Resolve first:\n```\nGET \u002Fopen-apis\u002Fwiki\u002Fv2\u002Fspaces\u002Fget_node?token=\u003Curl-token>\n→ data.node.obj_token (doc_id), data.node.space_id, data.node.parent_node_token\n```\n\n### Transfer document ownership (verified 2026-08-14)\n\nWhen the bot creates a document but the user needs full control (move, delete, reshare),\ntransfer ownership to the user. This makes the user the document owner.\n\n```\nPOST \u002Fopen-apis\u002Fdrive\u002Fv1\u002Fpermissions\u002F{doc_token}\u002Fmembers\u002Ftransfer_owner?type=docx\nBody: {\"member_type\":\"openid\",\"member_id\":\"\u003Cuser_open_id>\"}\n```\n\n- Verified working on chat-bot app (`cli_aa95…`). Requires `drive:drive` scope.\n- After transfer, the user can move the doc into wiki from the Feishu UI without bot involvement.\n- The bot retains collaborator access but is no longer the owner.\n- Use this as step 4 of the fallback workflow below when the bot can't move docs into wiki.\n\n### Add user as collaborator (verified 2026-08-14)\n\n```\nPOST \u002Fopen-apis\u002Fdrive\u002Fv1\u002Fpermissions\u002F{doc_token}\u002Fmembers?type=docx\nBody: {\"member_type\":\"openid\",\"member_id\":\"\u003Cuser_open_id>\",\"perm\":\"full_access\"}\n```\n\n- `perm` values: `view`, `edit`, `full_access`.\n- Works when the bot is the document owner (created the doc itself).\n- Returns `1063002 \"Permission denied\"` if the bot is NOT the owner — can't self-grant on\n  docs owned by others.\n\n## Fallback workflow (when bot lacks wiki edit permission)\n\n1. **Create standalone doc** (works with docx scopes):\n   ```\n`\n   POST \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments  Body: {\"folder_token\": \"\"}\n   → data.document.document_id\n   ```\n2. **Write blocks** into the standalone doc (see \"Doc write flow\" below).\n3. **Attempt to move into wiki** — this WILL fail with `131006` if the bot isn't a wiki space\n   member with edit permission:\n   ```\n   POST \u002Fopen-apis\u002Fwiki\u002Fv2\u002Fspaces\u002F{space_id}\u002Fnodes\u002Fmove_docs_to_wiki\n   Body: {\"parent_wiki_token\": \"\u003Cparent_node_token>\", \"obj_type\": \"docx\", \"obj_token\": \"\u003Cdoc_id>\"}\n   → code: 131006 \"permission denied: no destination parent node permission\"\n   ```\n4. **Transfer ownership to user** so they can move it from the Feishu UI:\n   ```\n   POST \u002Fopen-apis\u002Fdrive\u002Fv1\u002Fpermissions\u002F{doc_id}\u002Fmembers\u002Ftransfer_owner?type=docx\n   Body: {\"member_type\":\"openid\",\"member_id\":\"\u003Cuser_open_id>\"}\n   ```\n5. **User moves the doc into wiki** via Feishu UI: open doc → \"···\" → 移动 → select wiki page.\n   The user must be the doc owner (step 4) to move it.\n\n### Checking wiki space membership\n\nThe members list API works with read access:\n```\nGET \u002Fopen-apis\u002Fwiki\u002Fv2\u002Fspaces\u002F{space_id}\u002Fmembers?page_size=20\n```\nCheck if the bot's `open_id` (from `GET \u002Fbot\u002Fv3\u002Finfo`) appears in the member list and what\n`member_role` it has (`admin` \u002F `edit` \u002F `view`). If missing or `view` only, wiki child node\ncreation is impossible without user action.\n\n### Required scopes for wiki node creation\n\n- `wiki:wiki` or `wiki:node:create` — these are SEPARATE from `wiki:wiki:readonly`\n- The janus app (`cli_aae7…`) has `wiki:wiki:readonly` only → returns `99991672` on wiki write\n- Even with scopes, wiki space membership with edit permission is required (same scope ≠\n  collaborator pattern as drive files)\n\n## Drive upload (archiving artifacts)\n\n- `POST \u002Fopen-apis\u002Fdrive\u002Fv1\u002Ffiles\u002Fupload_all` (multipart, \u003C20MB\u002Ffile). Gotcha: EVERY field\n  (`file_name`, `parent_type`, `size`, `parent_node`) must be a multipart form-data field in the\n  BODY — query params return `code: 1061002` on every file.\n- Response links: `https:\u002F\u002F\u003Ctenant>.feishu.cn\u002Ffile\u002F\u003Cfile_token>`.\n\n## Doc write flow (create + write blocks)\n\nCreate and populate Feishu docx documents via the Open API. Verified 2026-08-06.\n\n### Required scopes (in addition to read scopes)\n\n- `docx:document` or `docx:document:create` — create documents and write block content\n- Scopes must be enabled AND the app must publish a new version (version management →\n  创建版本 → 发布) if in dev mode. Enabling the scope alone does NOT take effect until published.\n\n### Create document\n\n```\nPOST \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments\nBody: {\"folder_token\": \"\"}   # empty = app's default folder\n→ data.document.document_id  # use this as the doc token for block writes\n```\n\n### Write blocks into a document\n\n```\nPOST \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments\u002F\u003Cdoc_id>\u002Fblocks\u002F\u003Cdoc_id>\u002Fchildren\n```\n\nThe `\u003Cdoc_id>` appears as both the document ID and the parent block ID (the document root IS\na block). Body has a `children` array of block objects. Key block types:\n\n| block_type | Meaning | Key field |\n|---|---|---|\n| 2 | Text (paragraph) | `text.elements[].text_run.content` |\n| 3 | Heading 1 | `heading1.elements[].text_run.content` |\n| 4 | Heading 2 | `heading2.elements[].text_run.content` |\n| 5 | Heading 3 | `heading3.elements[].text_run.content` |\n| 12 | Bullet list item | `bullet.elements[].text_run.content` |\n| 13 | Ordered list item | `ordered.elements[].text_run.content` |\n| 14 | Code block | `code.elements[].text_run.content` + `code.style.language` (1=PlainText, 39=Markdown, 49=Python; NO mermaid) |\n| 31 | Table | `table.property.{row_size, column_size, column_width, header_row}` — cells via descendant endpoint only |\n| 32 | Table cell | `table_cell: {}` + `children: [\"\u003Ctext-block-tmp-id>\"]` |\n\nExample body (heading + two paragraphs):\n```json\n{\n  \"children\": [\n    {\n      \"block_type\": 3,\n      \"heading1\": {\"elements\": [{\"text_run\": {\"content\": \"标题\"}}]}\n    },\n    {\n      \"block_type\": 2,\n      \"text\": {\"elements\": [{\"text_run\": {\"content\": \"段落内容\"}}]}\n    }\n  ]\n}\n```\n\n### Write pitfalls\n\n- **Dev-mode publish gotcha**: after enabling `docx:document` scope, the API still returns\n  `code: 99991672` until the user creates and publishes a new app version in the Feishu console.\n  The missing-scope error carries a grant link in `msg` — hand it to the user, but also tell\n  them to publish.\n- The document root block ID = the document ID itself. Use it as the parent when writing\n  top-level children.\n- Block `elements` is an array; multiple `text_run` entries allow inline formatting (bold, links).\n- Creating a document returns a URL: `https:\u002F\u002F\u003Ctenant>.feishu.cn\u002Fdocx\u002F\u003Cdocument_id>`.\n- Writing to an existing document (e.g. a wiki page) requires the app to be a collaborator with\n  edit permission (可编辑), not just read.\n- **Batch limit: 50 blocks per request** (API returns error if exceeded). For large documents\n  (100+ blocks), batch writes in chunks of 45 with a 0.5s sleep between batches. A 375-block\n  document was successfully written in 9 batches of 45 on 2026-08-14. Use a Python script with\n  `urllib.request` (not curl) for batch writes — easier JSON construction and error handling.\n### Restructuring an existing doc's heading hierarchy (grouping \u002F renumbering)\n\nTo add a grouping layer ABOVE existing sections (e.g. user asks \"把 2.0-2.11 再加一层大目录区分\"), or otherwise reorganize headings, know these hard constraints (verified 2026-08-18):\n\n- **block_type is immutable via API** — no `replace_block`, no heading-level change (h2→h3 fails with `1770001 invalid param`). A heading created as h2 stays h2 forever.\n- **No block MOVE via batch_update** — only insert (children\u002Fdescendant with `index`), delete-by-index-range, and content PATCH. Physical order of existing blocks cannot be regrouped.\n- **Workable pattern — \"regroup by renumbering\"**: insert the new group headings at the right positions, then renumber the existing sub-headings' CONTENT via `batch_update` `update_text` (e.g. `2.6 torch.library` → `2.1.1 torch.library`). The numbering carries the grouping semantics even when physical order can't match. Verify with a script: parse all headings, assert each sub-number's group-prefix matches the group heading it sits under.\n- **Insert multiple headings back-to-front**: when inserting group titles at several `index` positions in ONE pass, insert in DECREASING index order (largest index first) so earlier insertions don't shift later targets. Inserting front-to-back drifts every subsequent index by +1.\n- **Re-fetch the block list before assuming structure**: the doc may have been edited by the user or another session since your last read (this session found new headings that the agent never created — a stale mental model caused wrong insert positions).\n\n### Insert at a position**: append `?index=N` to the same children URL (block index where the\n  new blocks land). Verified 2026-08-14: inserting a subsection at `index=29` (before heading\n  1.2) worked — useful for splicing corrections into an existing doc without rewriting it.\n\n### Splicing into an existing doc: use the `descendant` endpoint for nested content\n\nTo insert tables or any block WITH children into an existing document (e.g. answer a doc\ncomment by adding a section + table before the next heading), the plain `children` endpoint\nCANNOT carry cell text — `table.cells` is a `string[]` of cell-block IDs, and inline cell\nblocks in the same call fail with `code: 9499`. Use:\n\n```\nPOST \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments\u002F\u003Cdoc_id>\u002Fblocks\u002F\u003Cdoc_id>\u002Fdescendant\nBody: {\"index\": \u003Cposition>, \"children_id\": [\"tmp1\",...],\n       \"descendants\": [\u003Cevery block in the tree, leaves have children: []>]}\n```\n\nKey facts (verified 2026-08-17):\n- `children_id` lists temp IDs of TOP-LEVEL blocks only; `descendants` defines every block\n  (table → table_cell → text, each referencing children by temp ID). Response maps temp→real.\n- `index` = insertion position among the page's children; find it by GETting children and\n  locating the target heading block's index, then insert there.\n- **`update_text` in `batch_update` requires BOTH `style: {\"align\": 1}` AND `fields: [1]`** —\n  omitting either returns `code: 99992402 field validation failed`. This is also the way to\n  REPURPOSE a throwaway test block into real content (since plain DELETE of a block returns\n  `404 page not found` on this tenant; use repurpose or `children\u002Fbatch_delete` by index range).\n- **No mermaid block**: Feishu `diagram` blocks only support flowchart\u002FUML. Deliver mermaid as\n  a code block (`block_type: 14`, `style.language: 1` PlainText) and note the user can copy it\n  to a mermaid renderer. `block_type: 35` + `language: 11` (older docs) returns `1770001`.\n- Full worked example + table construction: `references\u002Ffeishu-docx-descendant-write.md`.\n- **Delete blocks (batch_delete)**: `DELETE \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments\u002F\u003Cdoc_id>\u002Fblocks\u002F\u003Cdoc_id>\u002Fchildren\u002Fbatch_delete`\n  with body `{\"start_index\": 0, \"end_index\": N}`. Max ~100 per call; delete from `start_index=0`\n  repeatedly (remaining blocks shift down) to clear the whole doc. Verified: wiped a 567-block\n  doc in 6 calls.\n- **Full-doc rewrite pattern**: to restructure a doc (e.g. re-order sections), read all blocks\n  (paginate `GET ...\u002Fchildren?page_size=500&page_token=...`), then batch_delete everything from\n  index 0, then write the new content in chunks of 45. Verified 2026-08-14: 567 blocks deleted +\n  282 rewritten in 7 batches.\n\n## Drive file download (read attached files from \u002Ffile\u002F links or wiki file nodes)\n\nUser pastes a link like `https:\u002F\u002F\u003Ctenant>.feishu.cn\u002Ffile\u002F\u003Cfile_token>` (PPTX\u002FPDF\u002Fetc.), OR\na wiki node resolves with `obj_type: file` (the `obj_token` is the file token):\n\n```\nGET \u002Fopen-apis\u002Fdrive\u002Fv1\u002Ffiles\u002F\u003Cfile_token>\u002Fdownload\nAuthorization: Bearer \u003Ctenant_access_token>\n```\n\n- Returns the raw binary (HTTP 200) — save with `curl -o` and check with `file` (e.g.\n  \"Microsoft PowerPoint 2007+\" or \"Microsoft Word 2007+\").\n- **Which app to use**: try the chat-bot app (cli_aa95…) first; if it returns `403` with an\n  empty body, try the janus app (cli_aae7…). If janus returns `400 \u002F code: 99991672`, it\n  lacks the `drive:file:download` scope — see the error table below.\n- Meta endpoint `GET \u002Fopen-apis\u002Fdrive\u002Fv1\u002Ffiles\u002F\u003Cfile_token>` can return non-JSON (rate-limit \u002F\n  error page) — don't block on it; the download endpoint is the reliable path.\n- The `GET \u002Fopen-apis\u002Fdrive\u002Fv1\u002Fmedias\u002F\u003Cfile_token>\u002Fdownload` endpoint also exists but returns\n  the same errors — do NOT use it as a workaround for download permission issues.\n\n### Download permission diagnostics (error → cause → fix)\n\n| HTTP | code | body | cause | fix |\n|---|---|---|---|---|\n| 400 | 99991672 | `{\"msg\":\"Access denied...scopes required: [drive:drive...]\"} `| App lacks drive download scope | Feishu console → 权限管理 → add `drive:file:download` (or `drive:drive:readonly`) → 版本管理 → 创建版本 → 发布 |\n| 403 | (none) | empty body | App HAS the scope but is NOT a collaborator on this specific file | User must share the file with the bot in Feishu UI (分享 → add bot → 可阅读). Cannot self-grant via permissions API — returns `1063002 \"Permission denied\"` |\n| 403 | 1063004 | `{\"msg\":\"User has no share permission\"}` | App tried to add itself as collaborator but lacks share permission on the file | Only the file owner can grant collaborator access; ask the user to share it manually |\n\n- **Scope ≠ collaborator**: even with `drive:file:download` scope granted AND published, the app\n  must also be an explicit collaborator (可阅读) on each individual file. Wiki space visibility\n  does NOT automatically extend to file attachments within wiki nodes.\n- If both apps fail and the user cannot share the file, ask them to paste the content or\n  export the document (Word\u002FPDF\u002FMD) directly in chat.\n\n### Extracting text and images from a downloaded PPTX\n\n#### Method 1: python-pptx (preferred when available)\n\nThe Hermes venv python3.11 has no pip, so `import pptx` fails there. Use the SYSTEM python:\n\n```bash\n\u002Fusr\u002Fbin\u002Fpython3 -m pip install python-pptx -q     # system python 3.10, has pip\n\u002Fusr\u002Fbin\u002Fpython3 -c \"\nfrom pptx import Presentation\nprs = Presentation('\u002Ftmp\u002Ffeishu_ppt.pptx')\nfor i, slide in enumerate(prs.slides, 1):\n    for shape in slide.shapes:\n        if shape.has_text_frame:\n            for para in shape.text_frame.paragraphs:\n                if para.text.strip(): print(para.text.strip())\n        if shape.has_table:\n            for row in shape.table.rows:\n                print(' | '.join(c.text.strip() for c in row.cells))\n\"\n```\n\nText frames + tables both extract; image-only slides print nothing (note them as such).\n\n#### User's preferred summary structure\n\nWhen the user asks for a PPTX\u002Fdocument summary, structure it around four questions\n(declared 2026-08-06):\n\n1. **是什么？** (What) — define the thing\u002Fconcept\u002Fproject\n2. **为什么？** (Why) — why it matters, pain points it solves\n3. **怎样做？** (How) — approach, technical details, roadmap\n4. **什么样的结果？** (What results) — outcomes, data, impact\n\nUse tables and bullet points (少即是多), not prose paragraphs. This mirrors the user's\ngeneral 3W1H work framework (What\u002FWhy\u002FWhen\u002FHow) with a results-oriented twist.\n\n#### Version-comparison analysis docs (corrected 2026-08-14)\n\nWhen writing a multi-version code analysis (e.g. \"vLLM 技术架构分析\" across v0.13.0 → v0.22.0),\nthe user's preferred structure is: **the primary analyzed version is the main body; the NEWER\nversion's deltas go at the END as an appendix**. Do NOT structure the doc as \"old version +\ndiff notes\" — the user explicitly asked to flip this: \"分析以0.13.0为主，最后再补充上0.22.0\n相较于0.13.0的变化\". Also: when a quick grep suggests a feature is \"absent\" in a version, verify\nwith a deeper search before asserting it — this session's first pass wrongly claimed the plugin\nsystem didn't exist in v0.13.0 when it did (4 plugin groups in vllm\u002Fplugins\u002F).\n\n#### Technical-analysis doc structure (review comments 2026-08-17)\n\nWhen the user reviews a technical-architecture analysis (worked case: the vLLM 算子集成 \u002F\nPyTorch 能力 doc) and asks you to update it, two structural preferences recur — both are\n\"review comments\" style corrections, so build them into the doc the FIRST time:\n\n1. **Selection guide, not just an inventory**: when the doc enumerates mechanisms\u002Foptions\n   (算子集成方式, attention backends, etc.), the user expects a 选型指南 covering for EACH\n   option: 适用场景 \u002F 为什么选它 \u002F 不选的代价, plus a one-line decision rule (\"要能被\n   torch.compile 优化 → 走 torch.ops（配 fake_impl）；性能热点且库成熟 → .so 直接调；\n   平台相关要 fallback → CustomOp；新硬件 → 平台插件；快速原型 → Triton\"). Listing what\n   exists without saying which to pick and why is incomplete.\n2. **High-level overview first**: before the per-topic deep-dive sections, add a 高层总览 —\n   a mermaid diagram of the capability layers + a short layer table. The user asked for\n   \"从更高层面上总结 vLLM 会使用 PyTorch 的哪些能力，使用 mermaid 画出来\". Deliver mermaid\n   as a code block (`block_type: 14`, `language: 1`) — see the descendant-write section.\n\n#### Method 2: ZIP + XML parsing (zero-dependency fallback)\n\nWhen `python-pptx` or `lxml` is broken\u002Funavailable, a PPTX is just a ZIP of XML files.\nThis method needs only `unzip` and Python stdlib `xml.etree.ElementTree` — no pip installs:\n\n```bash\n# 1. Unzip the PPTX\nmkdir -p \u002Ftmp\u002Fpptx_extract && unzip -o \u002Ftmp\u002Ffeishu_ppt.pptx -d \u002Ftmp\u002Fpptx_extract > \u002Fdev\u002Fnull 2>&1\n\n# 2. Keyword-search all slides to find the one you need\npython3 -c \"\nimport xml.etree.ElementTree as ET\nns_a = '{http:\u002F\u002Fschemas.openxmlformats.org\u002Fdrawingml\u002F2006\u002Fmain}'\nfor i in range(1, 62):  # adjust range to slide count\n    f = f'\u002Ftmp\u002Fpptx_extract\u002Fppt\u002Fslides\u002Fslide{i}.xml'\n    try:\n        root = ET.parse(f).getroot()\n    except: continue\n    texts = [t.text for t in root.iter(f'{ns_a}t') if t.text]\n    combined = ' '.join(texts)\n    if 'PCB' in combined or '超节点' in combined:  # your keywords\n        print(f'--- Slide {i} ---')\n        print(combined[:300])\n\"\n\n# 3. Extract images from a specific slide (slide 29 in this example)\npython3 -c \"\nimport xml.etree.ElementTree as ET, re\n# Parse slide XML for r:embed references\ntree = ET.parse('\u002Ftmp\u002Fpptx_extract\u002Fppt\u002Fslides\u002Fslide29.xml')\nns_r = '{http:\u002F\u002Fschemas.openxmlformats.org\u002FofficeDocument\u002F2006\u002Frelationships}'\nns_a = '{http:\u002F\u002Fschemas.openxmlformats.org\u002Fdrawingml\u002F2006\u002Fmain}'\nfor blip in tree.getroot().iter(f'{ns_a}blip'):\n    rid = blip.get(f'{ns_r}embed')\n    print(f'Image rId: {rid}')\n# Parse the rels file to map rId → media file path\nwith open('\u002Ftmp\u002Fpptx_extract\u002Fppt\u002Fslides\u002F_rels\u002Fslide29.xml.rels') as f:\n    for m in re.finditer(r'Id=\\\"([^\\\"]+)\\\".*Target=\\\"\\.\\.\u002F(media\u002F[^\\\"]+)\\\"', f.read()):\n        print(f'{m.group(1)} → {m.group(2)}')\n\"\n# Images are at \u002Ftmp\u002Fpptx_extract\u002Fppt\u002Fmedia\u002FimageNN.png — copy and deliver via MEDIA:\n```\n\nSee `references\u002Fpptx-extraction.md` for a complete worked example with image extraction.\n\n#### When image analysis isn't available\n\nIf `vision_analyze` returns generic \"I cannot see images\" responses (model limitation, not a\ntool failure), deliver the extracted images directly to the user via `MEDIA:\u002Fpath\u002Fto\u002Fimage.png`\nand explain the content textually based on the slide's extracted text. The user can see the\nimages natively in Feishu even when the model cannot analyze them.\n\n### PDF text extraction (pdf-inspector preferred, pymupdf fallback — mx001)\n\nWhen you need to extract text from a PDF file (e.g. an AIGC detection report, a paper PDF):\n\n- **Preferred: pdf-inspector** (Firecrawl Rust lib, ⭐16k — installed 2026-08-19 in the Hermes venv).\n  Classifies text\u002Fscanned\u002Fmixed (~10-50ms), extracts structured Markdown (headings\u002Ftables\u002Flists),\n  beats pymupdf4llm on opendataloader-bench (0.875 vs 0.735) at 0.1-0.5s per 20-page paper:\n  ```bash\n  # Install into the Hermes venv when pip is missing — uv works where venv has no pip:\n  uv pip install --python \u002Fhome\u002Fecs-user\u002F.hermes\u002Fhermes-agent\u002Fvenv\u002Fbin\u002Fpython pdf-inspector\n  ```\n  ```python\n  import pdf_inspector\n  r = pdf_inspector.process_pdf('\u002Fpath\u002Fto\u002Ffile.pdf')\n  print(r.pdf_type)    # text_based \u002F scanned \u002F image_based \u002F mixed\n  print(r.markdown)    # structured Markdown (or None for scanned)\n  pages = pdf_inspector.extract_pages_markdown('\u002Fpath\u002Fto\u002Ffile.pdf')  # PagesExtractionResult, NOT a list\n  # pages.pages -> list of PageMarkdown(page=N, markdown=..., needs_ocr=bool)\n  # Scanned PDFs: process_pdf_with_ocr() routes only scanned pages to PP-OCRv6\n  ```\n  Pitfalls: `extract_pages_markdown` returns a `PagesExtractionResult` object — access `.pages`;\n  `result.markdown` is `None` for scanned PDFs (use the `_with_ocr` variant).\n\n- **Fallback: pymupdf** — use system python3.10, NOT the Hermes venv python3.11 (no pip):\n  ```bash\n  python3.10 -m pip install pymupdf -q   # system python has pip\n  python3.10 -c \"\n  import pymupdf   # use 'pymupdf', NOT 'fitz' (deprecated, warns)\n  doc = pymupdf.open('\u002Fpath\u002Fto\u002Ffile.pdf')\n  for i, page in enumerate(doc):\n      text = page.get_text()\n      if text.strip():\n          print(f'--- Page {i+1} ---')\n          print(text[:3000])\n  \"\n  ```\n- `import fitz` still works but emits a deprecation warning; prefer `import pymupdf`.\n- For large PDFs, paginate with `head -N` on the output to avoid flooding context.\n- **General rule for installing Python packages into the Hermes venv** (verified 2026-08-19):\n  the venv has NO pip, but `uv pip install --python \u003Cvenv-python> \u003Cpkg>` works fine. Use it\n  instead of switching to system python when the package is needed in the agent's own venv.\n\n## References\n\n- `references\u002Ffeishu-open-api.md` — read flow (token + wiki + docx), drive upload, scopes, error codes.\n- `references\u002Ffeishu-doc-write-api.md` — doc write flow (create + block types + formatting).\n- `references\u002Fwiki-node-management.md` — wiki child node creation APIs, permission diagnostics,\n  batch block writing pattern (50-block limit, Python batch script, block construction helpers).\n- `references\u002Ffeishu-docx-descendant-write.md` — splicing content into EXISTING docs: descendant\n  endpoint (children_id + descendants), table via block_type 31\u002F32, update_text validation\n  (style+fields required), DELETE-block 404 quirk, mermaid-in-code-block pattern.\n- `references\u002Ffeishu-comment-events.md` — gateway-side automated comment auto-reply: config\n  (`feishu_comment_rules.json`), access-control policies, event flow, log diagnosis, source\n  file map.\n- `references\u002Fpptx-extraction.md` — zero-dependency PPTX text + image extraction via ZIP\u002FXML parsing (fallback when python-pptx\u002Flxml is broken).\n\n## Pitfalls\n\n- `curl` on `https:\u002F\u002F\u003Ctenant>.feishu.cn\u002Fwiki\u002F\u003Ctoken>` returns HTTP 200 but an SSO\u002Fpassport shell —\n  no doc content, no embedded JSON. Never parse it; always use the API.\n- Public-share scraping is unreliable; many tenants require login even for \"anyone with the link\".\n- If no credentials \u002F no access: ask the user to paste content or export the doc (Word\u002FPDF\u002FMD) —\n  do NOT ask them to make the doc public.\n- **Write scope ≠ write ability**: enabling `docx:document` scope in the Feishu console does NOT\n  take effect until a new app version is published (dev-mode apps). The API keeps returning\n  `code: 99991672` until published. Tell the user: 权限管理 → 勾选 → 版本管理 → 创建版本 → 发布.\n- Models in `\u002Fv1\u002Fmodels` may be listed but not callable (observed: yicloud `glm5.2-pd` returns\n  \"Invalid model name\"). Test with a real chat request, not just the models endpoint.\n- **Wiki `obj_type: file` is not a docx**: when wiki node resolution returns `obj_type: file`,\n  the `obj_token` is a drive file token — the docx `raw_content` API returns `404 \u002F 1770002`.\n  Switch to the drive download endpoint. See \"Drive file download\" section above.\n- **File download needs collaborator access, not just scope**: even with `drive:file:download`\n  scope granted and published, the app must be an explicit collaborator on each file. A `403`\n  with empty body means \"not a collaborator\" — the app cannot self-grant via the permissions\n  API (returns `1063002`). Ask the user to share the file with the bot in the Feishu UI.\n- **Wiki child node creation needs wiki space membership, not just docx scopes**: `docx:document`\n  + `docx:document:create` let the bot create standalone docs, but creating a child node under a\n  wiki page returns `code: 131006 \"permission denied: node permission denied, tenant needs edit\n  permission\"`. The bot must be a wiki space member with edit\u002Fadmin role. This is a different\n  permission from docx write scopes. See \"Wiki child node creation\" section above.\n- **Divider block requires `\"divider\": {}` field**: `{\"block_type\": 22}` alone causes\n  `code: 1770001 \"invalid param\"` that rejects the ENTIRE batch (not just the divider block).\n  Always use `{\"block_type\": 22, \"divider\": {}}`. Same pattern applies to other content-less\n  block types — include their (possibly empty) content field.\n- **Plain DELETE of a block returns 404** on this tenant: `DELETE ...\u002Fblocks\u002F\u003Cblock_id>`\n  (even with `?document_revision_id=-1`). To remove content, use `children\u002Fbatch_delete` with\n  `{\"start_index\":0,\"end_index\":N}` or PATCH-repurpose the block via `update_text`.\n- **Tables can't be created with content via the `children` endpoint**: `table.cells` is a\n  `string[]` of cell-block IDs; inlining cell blocks fails `code: 9499`. Use the `descendant`\n  endpoint (children_id + descendants, block_type 31 table \u002F 32 table_cell). See\n  `references\u002Ffeishu-docx-descendant-write.md`.\n- **`update_text` needs `style` AND `fields`**: `batch_update` PATCH returns `99992402` unless\n  the request includes `\"style\": {\"align\": 1}` and `\"fields\": [1]` alongside `elements`.\n- **No mermaid block type**: Feishu `diagram` blocks are flowchart\u002FUML only; `block_type: 35`\n  code blocks (older docs) return `1770001`. Put mermaid source in a real code block\n  (`block_type: 14`, `language: 1`).\n- **Comment reply body must be flat `content`**: POSTing to `...\u002Fcomments\u002F\u003Cid>\u002Freplies` with\n  `{\"reply_list\": {\"replies\": [{\"content\": ...}]}}` returns `99992402 \"content is required\"`.\n  Use `{\"content\": {\"elements\": [{\"type\": \"text_run\", \"text_run\": {\"text\": \"...\"}}]}}` directly.\n- **Missing `feishu_comment_rules.json` = silent denial**: if the rules file does not exist,\n  the code defaults to `policy=\"pairing\"` + empty `allow_from`, which denies ALL comment\n  events. The gateway log shows `User ... denied (policy=pairing, rule=top)`. Always create\n  the rules file with `policy: \"allowlist\"` and the user's `open_id` before testing comment\n  auto-reply. See \"Automated comment event handling\" section above.\n","# Feishu \u002F Lark Docs Access (mx001, ai-engineer profile)\n\nUse when the user pastes a Feishu\u002FLark doc link (`https:\u002F\u002F\u003Ctenant>.feishu.cn\u002Fwiki\u002F\u003Ctoken>`,\n`\u002Fdocx\u002F\u003Ctoken>`, `\u002Fdocs\u002F\u003Ctoken>`) and asks to read\u002Fsummarize it, or asks to upload artifacts to\nFeishu cloud space. Reply in Chinese — the user works in a Feishu workspace.\n\n## Tool limitation first\n\nThe following deferred-catalog plugin tools only work **in a doc-comment context** (i.e. when\nthe gateway delivered a comment event to the agent); in a plain DM they all fail with\n\"Feishu client not available (not in a Feishu comment context)\":\n\n- `feishu_doc_read` — read doc content\n- `feishu_drive_list_comments` — list comments on a doc\n- `feishu_drive_reply_comment` — reply to a local (quoted-text) comment thread\n- `feishu_drive_add_comment` — add a whole-document comment\n- `feishu_drive_list_comment_replies` — list replies in a comment thread\n\nDo NOT retry any of these in a loop — fall through to the direct API paths below. When the user\nsays \"我在文档里评论了\" or \"回复文档评论\", go straight to the **Doc comments (read & reply from\nDM)** section.\n\n## Credentials on this machine\n\n- **Read scopes live on the janus app**: `~\u002F.hermes\u002Fprofiles\u002Fjanus-model-adapt\u002Fsecrets\u002Ffeishu_app.json`\n  (app `cli_aae7…`, provisioned 2026-08-05, doc read scopes enabled). The user approved its use\n  for doc reads; copy it to `~\u002F.hermes\u002Fprofiles\u002F\u003Cprofile>\u002Fsecrets\u002Ffeishu_app.json` (chmod 600)\n  when the active profile lacks one.\n- **Write scopes live on the chat-gateway bot**: the app `cli_aa95…` (creds `FEISHU_APP_ID` \u002F\n  `FEISHU_APP_SECRET` in the profile `.env`) has `docx:document` + `docx:document:create`\n  (verified 2026-08-06: create doc + write blocks succeeded with it), while the janus app\n  still returns `code: 99991672` on write calls.\n- **Two-app split is the norm on this machine**: read with the janus app, write with the chat bot.\n  If one app fails a call with `99991672`, switch to the OTHER app's credentials before asking the\n  user to grant scopes — the user may have granted them to the app you're not using.\n- Never write app_secret to memory or echo it in chat.\n\n## API read flow (app creds → doc text)\n\n1. `POST https:\u002F\u002Fopen.feishu.cn\u002Fopen-apis\u002Fauth\u002Fv3\u002Ftenant_access_token\u002Finternal` with\n   `{\"app_id\":…,\"app_secret\":…}` → `tenant_access_token`.\n2. **Wiki links need two-step resolution**: the URL token is the *wiki node* token. Call\n   `GET \u002Fopen-apis\u002Fwiki\u002Fv2\u002Fspaces\u002Fget_node?token=\u003Curl-token>` → `obj_token` (+ `obj_type`, usually\n   `docx`) before reading.\n3. Read content: `GET \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments\u002F\u003Cobj_token>\u002Fraw_content` (docx) — returns plain\n   text. Legacy `\u002Fdocs\u002F` tokens use the docx API too after resolution.\n4. **If `obj_type` is `file`** (not `docx`): the `obj_token` is a drive file token, NOT a docx\n   document ID. The docx `raw_content` API returns `404 \u002F code: 1770002 \"not found\"`. Use the\n   **Drive file download** flow below instead — `GET \u002Fopen-apis\u002Fdrive\u002Fv1\u002Ffiles\u002F\u003Cobj_token>\u002Fdownload`.\n   This happens when a .docx\u002F.pptx\u002F.pdf is uploaded as a file attachment to a wiki node rather\n   than created as a native Feishu doc.\n\n## IM message read (recover full bot-delivered text — cron responses, alerts)\n\nWhen a user replies to a bot-delivered message (e.g. a cron job response) and you need the FULL\ntext — the Feishu reply quote is truncated, and the local store (cron jobs.db\u002Foutput, session DB,\ngateway logs) may be wiped\u002Fempty — fetch the original message from the IM API:\n\n- **Which app**: the chat-gateway bot (`cli_aa95…`, creds `FEISHU_APP_ID` \u002F `FEISHU_APP_SECRET` in\n  the profile `.env`). The janus read app (`cli_aae7…`) is NOT a member of DMs and fails with\n  `code 230002 \"Bot\u002FUser can NOT be out of the chat\"` on IM calls.\n- **Which ID**: in a DM, the session-key thread token (the `:om_...` suffix, e.g.\n  `agent:main:feishu:dm:\u003Cchat_id>:om_x100...`) IS the `message_id` of the message the user replied\n  to (gateway logs it as `reply_to_id`). Fetch it directly — no list call needed.\n- **Call**: `GET \u002Fopen-apis\u002Fim\u002Fv1\u002Fmessages\u002F\u003Cmessage_id>` with\n  `Authorization: Bearer \u003Ctenant_access_token>`.\n- **Parse**: `msg_type` is usually `post`; `data.items[0].body.content` is JSON with `content`\n  (rich segment array) and `content_v2` (clean markdown array). Read `content_v2[0].text` for the\n  full readable markdown.\n\n## Automated comment event handling (gateway-side auto-reply)\n\nThe Hermes Feishu adapter can auto-respond to document comments without user DM\nintervention. When a user @mentions the bot in a Feishu document comment, the\ngateway receives a `drive.notice.comment_add_v1` event, runs a comment-agent\nwith `feishu_doc` + `feishu_drive` tools, and posts the reply back to the\ncomment thread.\n\nThis is **separate from the manual API flow** above — it requires gateway-side\nconfiguration and event subscription, not just API credentials.\n\n### Access-control config: `feishu_comment_rules.json`\n\nLocated at `get_hermes_home() \u002F \"feishu_comment_rules.json\"` (profile-specific,\nmtime-cached, hot-reloaded — no restart needed to pick up changes).\n\n```json\n{\n  \"enabled\": true,\n  \"policy\": \"allowlist\",\n  \"allow_from\": [\"ou_\u003Cuser_open_id>\"],\n  \"documents\": {}\n}\n```\n\n- **`policy: \"allowlist\"`** — only users in `allow_from` can trigger the bot.\n  This is the recommended policy for a single-user setup.\n- **`policy: \"pairing\"`** (default when file is missing) — users must be\n  approved via a separate `feishu_comment_pairing.json` store. With no pairing\n  file, **everyone is denied**. This is the most common misconfiguration.\n- **`documents`** — per-document overrides. Keys are `fileType:fileToken`\n  (e.g. `\"docx:LsPNdBQhuo6LD5xq6zjcSQ1hnAd\"`), or `\"*\"` for wildcard. Each\n  field (`enabled`, `policy`, `allow_from`) falls back independently through\n  exact → wildcard → top-level → code defaults.\n\n### Critical pitfall: missing rules file = silent denial\n\nIf `feishu_comment_rules.json` does not exist, the code defaults to\n`CommentsConfig()` → `policy=\"pairing\"` + empty `allow_from`. This silently\ndenies ALL comment events. The gateway log shows:\n\n```\n[Feishu-Comment] User ou_... denied (policy=pairing, rule=top)\n```\n\n**Always create the rules file before testing comment events.** Set\n`policy: \"allowlist\"` with the user's `open_id` in `allow_from`.\n\n### Event flow (for debugging)\n\n1. Feishu websocket delivers `drive.notice.comment_add_v1` event\n2. Adapter dispatches to `handle_drive_comment_event()` in\n   `plugins\u002Fplatforms\u002Ffeishu\u002Ffeishu_comment.py`\n3. Event is parsed; filtered by `to_open_id == bot_open_id` (bot must be\n   @mentioned) and `notice_type in {add_comment, add_reply}`\n4. Access control: `resolve_rule()` + `is_user_allowed()` — denied events\n   are logged and dropped (no reaction, no reply)\n5. If allowed: OK reaction added → parallel fetch (doc meta + comment details)\n   → build prompt → run comment-agent → deliver reply → remove reaction\n\n### Gateway log diagnosis\n\nSearch `~\u002F.hermes\u002Fprofiles\u002F\u003Cprofile>\u002Flogs\u002Fgateway.log` for `Feishu-Comment`:\n\n- `denied (policy=...)` — access control blocked the user; check rules file\n- `handle_drive_comment_event START` — event arrived and was parsed\n- No `Feishu-Comment` entries after a restart — events not arriving at all\n  (check Feishu console event subscription, not a Hermes-side issue)\n\n### Restarting the gateway (pitfall, verified 2026-08-17)\n\n`hermes gateway restart` run **from inside the gateway process** (i.e. from the agent's own\nterminal) is refused: `✗ Refusing to restart the gateway from inside the gateway process. This\ncommand was blocked to prevent restart loops.` The rules file itself hot-reloads (mtime-cached,\nno restart needed), but if a restart IS required (e.g. after .env changes): kill the old PID\nfound in `gateway_state.json` (`kill \u003Cpid>`), wait ~3s, and let the supervisor respawn it — the\nsession reconnects automatically. Verify afterwards with `cat gateway_state.json` →\n`platforms.feishu.state == connected`.\n\nSee `references\u002Ffeishu-comment-events.md` for full config format, rule\nresolution logic, and the comment-agent execution details.\n\n## Doc comments (read & reply from DM)\n\nWhen the user says \"我在文档里评论了\" \u002F \"回复文档评论\" and provides a doc URL, the plugin tools\nwon't work (see Tool limitation above). Use direct API calls instead. Verified 2026-08-17.\n\n### Which app to use\n\n- **List comments + read doc context**: use the **janus read app** (`cli_aae7…`) — it has\n  `drive:drive:readonly` and is already a collaborator on wiki docs the user shared.\n- **Reply to a comment**: use the **chat-bot app** (`cli_aa95…`, creds from `.env`) —\n  the janus app lacks `drive:drive` write scope and returns `99991672` on comment replies.\n  If janus fails on list too, switch to chat-bot (it has read access via `drive:drive`).\n\n### List comments\n\n```\nGET \u002Fopen-apis\u002Fdrive\u002Fv1\u002Ffiles\u002F\u003Cobj_token>\u002Fcomments?file_type=docx&page_size=100\nAuthorization: Bearer \u003Ctenant_access_token>\n```\n\nResponse `data.items[]` key fields:\n- `comment_id` — needed for reply\n- `quote` — the quoted doc text the comment is anchored to (gives context)\n- `is_whole` — `true` = whole-document comment; `false` = anchored to specific text\n- `is_solved` — whether the comment is resolved\n- `reply_list.replies[]` — existing replies; each reply has `content.elements[]` (same\n  structure as block elements: `text_run.text`, `person.user_id`, etc.)\n- `user_id` — comment author's `open_id`\n\n### Read doc context around the comment\n\nAfter listing comments, use the `quote` field to locate the relevant section in the doc:\n\n1. Read raw content: `GET \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments\u002F\u003Cobj_token>\u002Fraw_content`\n2. Search for the `quote` text to find surrounding context and understand what the user\n   is commenting on.\n\n### Reply to a comment\n\n```\nPOST \u002Fopen-apis\u002Fdrive\u002Fv1\u002Ffiles\u002F\u003Cobj_token>\u002Fcomments\u002F\u003Ccomment_id>\u002Freplies?file_type=docx\nAuthorization: Bearer \u003Ctenant_access_token>\nContent-Type: application\u002Fjson\n\nBody:\n{\n  \"content\": {\n    \"elements\": [\n      {\n        \"type\": \"text_run\",\n        \"text_run\": {\"text\": \"回复内容...\"}\n      }\n    ]\n  }\n}\n```\n\n**Critical**: the body must have a flat `content` object with `elements` — NOT wrapped in\n`reply_list`. Wrapping in `{\"reply_list\": {\"replies\": [{\"content\": ...}]}}` returns\n`code: 99992402 \"field validation failed\"` with `\"content is required\"`.\n\nMulti-line text in `text_run.text` is supported — use `\\n` for line breaks.\n\n## Required app scopes (permission management in Feishu console)\n\n- `docx:document:readonly`, `wiki:wiki:readonly`, `drive:drive:readonly` (read)\n- `drive:file:upload` (+ `space:folder:create` for folder creation) (upload)\n- Scopes alone are NOT enough: the app must also be a collaborator (可阅读) on the specific doc, or\n  the wiki space must be visible to it. Missing-scope error `code: 99991672` carries a grant link in\n  `msg` — hand it to the user verbatim.\n\n## Wiki child node creation (sub-documents under a wiki page)\n\nWhen the user asks to create a **child document under an existing wiki page** (e.g. \"在这个文档下面\n新建子文档\"), the flow is different from standalone doc creation.\n\n### The permission wall (critical)\n\nCreating a child wiki node requires **wiki space edit permission**, which is SEPARATE from\n`docx:document` \u002F `docx:document:create` scopes:\n\n- `docx:document` scopes → can create standalone docs in the app's default folder ✓\n- Wiki space edit permission → needed to create child nodes or move docs into wiki ✗\n\nThe bot app (`cli_aa95…`) has docx write scopes but is NOT a wiki space member with edit\npermission. Error: `code: 131006 \"permission denied: node permission denied, tenant needs edit\npermission\"`.\n\n### Relevant APIs\n\n| API | Purpose | Permission needed |\n|---|---|---|\n| `POST \u002Fwiki\u002Fv2\u002Fspaces\u002F{space_id}\u002Fnodes` | Create child wiki node directly | Wiki space edit (`wiki:wiki` or `wiki:node:create` scope + space membership) |\n| `POST \u002Fwiki\u002Fv2\u002Fspaces\u002F{space_id}\u002Fnodes\u002Fmove_docs_to_wiki` | Move standalone docx into wiki tree | Edit permission on the parent node |\n| `GET \u002Fwiki\u002Fv2\u002Fspaces\u002F{space_id}\u002Fmembers` | List wiki space members | Works with read access (view permission) |\n| `GET \u002Fbot\u002Fv3\u002Finfo` | Get bot's own open_id | Token only |\n\n### Two-step resolution (required before any wiki operation)\n\nWiki URLs use node tokens. Resolve first:\n```\nGET \u002Fopen-apis\u002Fwiki\u002Fv2\u002Fspaces\u002Fget_node?token=\u003Curl-token>\n→ data.node.obj_token (doc_id), data.node.space_id, data.node.parent_node_token\n```\n\n### Transfer document ownership (verified 2026-08-14)\n\nWhen the bot creates a document but the user needs full control (move, delete, reshare),\ntransfer ownership to the user. This makes the user the document owner.\n\n```\nPOST \u002Fopen-apis\u002Fdrive\u002Fv1\u002Fpermissions\u002F{doc_token}\u002Fmembers\u002Ftransfer_owner?type=docx\nBody: {\"member_type\":\"openid\",\"member_id\":\"\u003Cuser_open_id>\"}\n```\n\n- Verified working on chat-bot app (`cli_aa95…`). Requires `drive:drive` scope.\n- After transfer, the user can move the doc into wiki from the Feishu UI without bot involvement.\n- The bot retains collaborator access but is no longer the owner.\n- Use this as step 4 of the fallback workflow below when the bot can't move docs into wiki.\n\n### Add user as collaborator (verified 2026-08-14)\n\n```\nPOST \u002Fopen-apis\u002Fdrive\u002Fv1\u002Fpermissions\u002F{doc_token}\u002Fmembers?type=docx\nBody: {\"member_type\":\"openid\",\"member_id\":\"\u003Cuser_open_id>\",\"perm\":\"full_access\"}\n```\n\n- `perm` values: `view`, `edit`, `full_access`.\n- Works when the bot is the document owner (created the doc itself).\n- Returns `1063002 \"Permission denied\"` if the bot is NOT the owner — can't self-grant on\n  docs owned by others.\n\n## Fallback workflow (when bot lacks wiki edit permission)\n\n1. **Create standalone doc** (works with docx scopes):\n   ```\n`\n   POST \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments  Body: {\"folder_token\": \"\"}\n   → data.document.document_id\n   ```\n2. **Write blocks** into the standalone doc (see \"Doc write flow\" below).\n3. **Attempt to move into wiki** — this WILL fail with `131006` if the bot isn't a wiki space\n   member with edit permission:\n   ```\n   POST \u002Fopen-apis\u002Fwiki\u002Fv2\u002Fspaces\u002F{space_id}\u002Fnodes\u002Fmove_docs_to_wiki\n   Body: {\"parent_wiki_token\": \"\u003Cparent_node_token>\", \"obj_type\": \"docx\", \"obj_token\": \"\u003Cdoc_id>\"}\n   → code: 131006 \"permission denied: no destination parent node permission\"\n   ```\n4. **Transfer ownership to user** so they can move it from the Feishu UI:\n   ```\n   POST \u002Fopen-apis\u002Fdrive\u002Fv1\u002Fpermissions\u002F{doc_id}\u002Fmembers\u002Ftransfer_owner?type=docx\n   Body: {\"member_type\":\"openid\",\"member_id\":\"\u003Cuser_open_id>\"}\n   ```\n5. **User moves the doc into wiki** via Feishu UI: open doc → \"···\" → 移动 → select wiki page.\n   The user must be the doc owner (step 4) to move it.\n\n### Checking wiki space membership\n\nThe members list API works with read access:\n```\nGET \u002Fopen-apis\u002Fwiki\u002Fv2\u002Fspaces\u002F{space_id}\u002Fmembers?page_size=20\n```\nCheck if the bot's `open_id` (from `GET \u002Fbot\u002Fv3\u002Finfo`) appears in the member list and what\n`member_role` it has (`admin` \u002F `edit` \u002F `view`). If missing or `view` only, wiki child node\ncreation is impossible without user action.\n\n### Required scopes for wiki node creation\n\n- `wiki:wiki` or `wiki:node:create` — these are SEPARATE from `wiki:wiki:readonly`\n- The janus app (`cli_aae7…`) has `wiki:wiki:readonly` only → returns `99991672` on wiki write\n- Even with scopes, wiki space membership with edit permission is required (same scope ≠\n  collaborator pattern as drive files)\n\n## Drive upload (archiving artifacts)\n\n- `POST \u002Fopen-apis\u002Fdrive\u002Fv1\u002Ffiles\u002Fupload_all` (multipart, \u003C20MB\u002Ffile). Gotcha: EVERY field\n  (`file_name`, `parent_type`, `size`, `parent_node`) must be a multipart form-data field in the\n  BODY — query params return `code: 1061002` on every file.\n- Response links: `https:\u002F\u002F\u003Ctenant>.feishu.cn\u002Ffile\u002F\u003Cfile_token>`.\n\n## Doc write flow (create + write blocks)\n\nCreate and populate Feishu docx documents via the Open API. Verified 2026-08-06.\n\n### Required scopes (in addition to read scopes)\n\n- `docx:document` or `docx:document:create` — create documents and write block content\n- Scopes must be enabled AND the app must publish a new version (version management →\n  创建版本 → 发布) if in dev mode. Enabling the scope alone does NOT take effect until published.\n\n### Create document\n\n```\nPOST \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments\nBody: {\"folder_token\": \"\"}   # empty = app's default folder\n→ data.document.document_id  # use this as the doc token for block writes\n```\n\n### Write blocks into a document\n\n```\nPOST \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments\u002F\u003Cdoc_id>\u002Fblocks\u002F\u003Cdoc_id>\u002Fchildren\n```\n\nThe `\u003Cdoc_id>` appears as both the document ID and the parent block ID (the document root IS\na block). Body has a `children` array of block objects. Key block types:\n\n| block_type | Meaning | Key field |\n|---|---|---|\n| 2 | Text (paragraph) | `text.elements[].text_run.content` |\n| 3 | Heading 1 | `heading1.elements[].text_run.content` |\n| 4 | Heading 2 | `heading2.elements[].text_run.content` |\n| 5 | Heading 3 | `heading3.elements[].text_run.content` |\n| 12 | Bullet list item | `bullet.elements[].text_run.content` |\n| 13 | Ordered list item | `ordered.elements[].text_run.content` |\n| 14 | Code block | `code.elements[].text_run.content` + `code.style.language` (1=PlainText, 39=Markdown, 49=Python; NO mermaid) |\n| 31 | Table | `table.property.{row_size, column_size, column_width, header_row}` — cells via descendant endpoint only |\n| 32 | Table cell | `table_cell: {}` + `children: [\"\u003Ctext-block-tmp-id>\"]` |\n\nExample body (heading + two paragraphs):\n```json\n{\n  \"children\": [\n    {\n      \"block_type\": 3,\n      \"heading1\": {\"elements\": [{\"text_run\": {\"content\": \"标题\"}}]}\n    },\n    {\n      \"block_type\": 2,\n      \"text\": {\"elements\": [{\"text_run\": {\"content\": \"段落内容\"}}]}\n    }\n  ]\n}\n```\n\n### Write pitfalls\n\n- **Dev-mode publish gotcha**: after enabling `docx:document` scope, the API still returns\n  `code: 99991672` until the user creates and publishes a new app version in the Feishu console.\n  The missing-scope error carries a grant link in `msg` — hand it to the user, but also tell\n  them to publish.\n- The document root block ID = the document ID itself. Use it as the parent when writing\n  top-level children.\n- Block `elements` is an array; multiple `text_run` entries allow inline formatting (bold, links).\n- Creating a document returns a URL: `https:\u002F\u002F\u003Ctenant>.feishu.cn\u002Fdocx\u002F\u003Cdocument_id>`.\n- Writing to an existing document (e.g. a wiki page) requires the app to be a collaborator with\n  edit permission (可编辑), not just read.\n- **Batch limit: 50 blocks per request** (API returns error if exceeded). For large documents\n  (100+ blocks), batch writes in chunks of 45 with a 0.5s sleep between batches. A 375-block\n  document was successfully written in 9 batches of 45 on 2026-08-14. Use a Python script with\n  `urllib.request` (not curl) for batch writes — easier JSON construction and error handling.\n### Restructuring an existing doc's heading hierarchy (grouping \u002F renumbering)\n\nTo add a grouping layer ABOVE existing sections (e.g. user asks \"把 2.0-2.11 再加一层大目录区分\"), or otherwise reorganize headings, know these hard constraints (verified 2026-08-18):\n\n- **block_type is immutable via API** — no `replace_block`, no heading-level change (h2→h3 fails with `1770001 invalid param`). A heading created as h2 stays h2 forever.\n- **No block MOVE via batch_update** — only insert (children\u002Fdescendant with `index`), delete-by-index-range, and content PATCH. Physical order of existing blocks cannot be regrouped.\n- **Workable pattern — \"regroup by renumbering\"**: insert the new group headings at the right positions, then renumber the existing sub-headings' CONTENT via `batch_update` `update_text` (e.g. `2.6 torch.library` → `2.1.1 torch.library`). The numbering carries the grouping semantics even when physical order can't match. Verify with a script: parse all headings, assert each sub-number's group-prefix matches the group heading it sits under.\n- **Insert multiple headings back-to-front**: when inserting group titles at several `index` positions in ONE pass, insert in DECREASING index order (largest index first) so earlier insertions don't shift later targets. Inserting front-to-back drifts every subsequent index by +1.\n- **Re-fetch the block list before assuming structure**: the doc may have been edited by the user or another session since your last read (this session found new headings that the agent never created — a stale mental model caused wrong insert positions).\n\n### Insert at a position**: append `?index=N` to the same children URL (block index where the\n  new blocks land). Verified 2026-08-14: inserting a subsection at `index=29` (before heading\n  1.2) worked — useful for splicing corrections into an existing doc without rewriting it.\n\n### Splicing into an existing doc: use the `descendant` endpoint for nested content\n\nTo insert tables or any block WITH children into an existing document (e.g. answer a doc\ncomment by adding a section + table before the next heading), the plain `children` endpoint\nCANNOT carry cell text — `table.cells` is a `string[]` of cell-block IDs, and inline cell\nblocks in the same call fail with `code: 9499`. Use:\n\n```\nPOST \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments\u002F\u003Cdoc_id>\u002Fblocks\u002F\u003Cdoc_id>\u002Fdescendant\nBody: {\"index\": \u003Cposition>, \"children_id\": [\"tmp1\",...],\n       \"descendants\": [\u003Cevery block in the tree, leaves have children: []>]}\n```\n\nKey facts (verified 2026-08-17):\n- `children_id` lists temp IDs of TOP-LEVEL blocks only; `descendants` defines every block\n  (table → table_cell → text, each referencing children by temp ID). Response maps temp→real.\n- `index` = insertion position among the page's children; find it by GETting children and\n  locating the target heading block's index, then insert there.\n- **`update_text` in `batch_update` requires BOTH `style: {\"align\": 1}` AND `fields: [1]`** —\n  omitting either returns `code: 99992402 field validation failed`. This is also the way to\n  REPURPOSE a throwaway test block into real content (since plain DELETE of a block returns\n  `404 page not found` on this tenant; use repurpose or `children\u002Fbatch_delete` by index range).\n- **No mermaid block**: Feishu `diagram` blocks only support flowchart\u002FUML. Deliver mermaid as\n  a code block (`block_type: 14`, `style.language: 1` PlainText) and note the user can copy it\n  to a mermaid renderer. `block_type: 35` + `language: 11` (older docs) returns `1770001`.\n- Full worked example + table construction: `references\u002Ffeishu-docx-descendant-write.md`.\n- **Delete blocks (batch_delete)**: `DELETE \u002Fopen-apis\u002Fdocx\u002Fv1\u002Fdocuments\u002F\u003Cdoc_id>\u002Fblocks\u002F\u003Cdoc_id>\u002Fchildren\u002Fbatch_delete`\n  with body `{\"start_index\": 0, \"end_index\": N}`. Max ~100 per call; delete from `start_index=0`\n  repeatedly (remaining blocks shift down) to clear the whole doc. Verified: wiped a 567-block\n  doc in 6 calls.\n- **Full-doc rewrite pattern**: to restructure a doc (e.g. re-order sections), read all blocks\n  (paginate `GET ...\u002Fchildren?page_size=500&page_token=...`), then batch_delete everything from\n  index 0, then write the new content in chunks of 45. Verified 2026-08-14: 567 blocks deleted +\n  282 rewritten in 7 batches.\n\n## Drive file download (read attached files from \u002Ffile\u002F links or wiki file nodes)\n\nUser pastes a link like `https:\u002F\u002F\u003Ctenant>.feishu.cn\u002Ffile\u002F\u003Cfile_token>` (PPTX\u002FPDF\u002Fetc.), OR\na wiki node resolves with `obj_type: file` (the `obj_token` is the file token):\n\n```\nGET \u002Fopen-apis\u002Fdrive\u002Fv1\u002Ffiles\u002F\u003Cfile_token>\u002Fdownload\nAuthorization: Bearer \u003Ctenant_access_token>\n```\n\n- Returns the raw binary (HTTP 200) — save with `curl -o` and check with `file` (e.g.\n  \"Microsoft PowerPoint 2007+\" or \"Microsoft Word 2007+\").\n- **Which app to use**: try the chat-bot app (cli_aa95…) first; if it returns `403` with an\n  empty body, try the janus app (cli_aae7…). If janus returns `400 \u002F code: 99991672`, it\n  lacks the `drive:file:download` scope — see the error table below.\n- Meta endpoint `GET \u002Fopen-apis\u002Fdrive\u002Fv1\u002Ffiles\u002F\u003Cfile_token>` can return non-JSON (rate-limit \u002F\n  error page) — don't block on it; the download endpoint is the reliable path.\n- The `GET \u002Fopen-apis\u002Fdrive\u002Fv1\u002Fmedias\u002F\u003Cfile_token>\u002Fdownload` endpoint also exists but returns\n  the same errors — do NOT use it as a workaround for download permission issues.\n\n### Download permission diagnostics (error → cause → fix)\n\n| HTTP | code | body | cause | fix |\n|---|---|---|---|---|\n| 400 | 99991672 | `{\"msg\":\"Access denied...scopes required: [drive:drive...]\"} `| App lacks drive download scope | Feishu console → 权限管理 → add `drive:file:download` (or `drive:drive:readonly`) → 版本管理 → 创建版本 → 发布 |\n| 403 | (none) | empty body | App HAS the scope but is NOT a collaborator on this specific file | User must share the file with the bot in Feishu UI (分享 → add bot → 可阅读). Cannot self-grant via permissions API — returns `1063002 \"Permission denied\"` |\n| 403 | 1063004 | `{\"msg\":\"User has no share permission\"}` | App tried to add itself as collaborator but lacks share permission on the file | Only the file owner can grant collaborator access; ask the user to share it manually |\n\n- **Scope ≠ collaborator**: even with `drive:file:download` scope granted AND published, the app\n  must also be an explicit collaborator (可阅读) on each individual file. Wiki space visibility\n  does NOT automatically extend to file attachments within wiki nodes.\n- If both apps fail and the user cannot share the file, ask them to paste the content or\n  export the document (Word\u002FPDF\u002FMD) directly in chat.\n\n### Extracting text and images from a downloaded PPTX\n\n#### Method 1: python-pptx (preferred when available)\n\nThe Hermes venv python3.11 has no pip, so `import pptx` fails there. Use the SYSTEM python:\n\n```bash\n\u002Fusr\u002Fbin\u002Fpython3 -m pip install python-pptx -q     # system python 3.10, has pip\n\u002Fusr\u002Fbin\u002Fpython3 -c \"\nfrom pptx import Presentation\nprs = Presentation('\u002Ftmp\u002Ffeishu_ppt.pptx')\nfor i, slide in enumerate(prs.slides, 1):\n    for shape in slide.shapes:\n        if shape.has_text_frame:\n            for para in shape.text_frame.paragraphs:\n                if para.text.strip(): print(para.text.strip())\n        if shape.has_table:\n            for row in shape.table.rows:\n                print(' | '.join(c.text.strip() for c in row.cells))\n\"\n```\n\nText frames + tables both extract; image-only slides print nothing (note them as such).\n\n#### User's preferred summary structure\n\nWhen the user asks for a PPTX\u002Fdocument summary, structure it around four questions\n(declared 2026-08-06):\n\n1. **是什么？** (What) — define the thing\u002Fconcept\u002Fproject\n2. **为什么？** (Why) — why it matters, pain points it solves\n3. **怎样做？** (How) — approach, technical details, roadmap\n4. **什么样的结果？** (What results) — outcomes, data, impact\n\nUse tables and bullet points (少即是多), not prose paragraphs. This mirrors the user's\ngeneral 3W1H work framework (What\u002FWhy\u002FWhen\u002FHow) with a results-oriented twist.\n\n#### Version-comparison analysis docs (corrected 2026-08-14)\n\nWhen writing a multi-version code analysis (e.g. \"vLLM 技术架构分析\" across v0.13.0 → v0.22.0),\nthe user's preferred structure is: **the primary analyzed version is the main body; the NEWER\nversion's deltas go at the END as an appendix**. Do NOT structure the doc as \"old version +\ndiff notes\" — the user explicitly asked to flip this: \"分析以0.13.0为主，最后再补充上0.22.0\n相较于0.13.0的变化\". Also: when a quick grep suggests a feature is \"absent\" in a version, verify\nwith a deeper search before asserting it — this session's first pass wrongly claimed the plugin\nsystem didn't exist in v0.13.0 when it did (4 plugin groups in vllm\u002Fplugins\u002F).\n\n#### Technical-analysis doc structure (review comments 2026-08-17)\n\nWhen the user reviews a technical-architecture analysis (worked case: the vLLM 算子集成 \u002F\nPyTorch 能力 doc) and asks you to update it, two structural preferences recur — both are\n\"review comments\" style corrections, so build them into the doc the FIRST time:\n\n1. **Selection guide, not just an inventory**: when the doc enumerates mechanisms\u002Foptions\n   (算子集成方式, attention backends, etc.), the user expects a 选型指南 covering for EACH\n   option: 适用场景 \u002F 为什么选它 \u002F 不选的代价, plus a one-line decision rule (\"要能被\n   torch.compile 优化 → 走 torch.ops（配 fake_impl）；性能热点且库成熟 → .so 直接调；\n   平台相关要 fallback → CustomOp；新硬件 → 平台插件；快速原型 → Triton\"). Listing what\n   exists without saying which to pick and why is incomplete.\n2. **High-level overview first**: before the per-topic deep-dive sections, add a 高层总览 —\n   a mermaid diagram of the capability layers + a short layer table. The user asked for\n   \"从更高层面上总结 vLLM 会使用 PyTorch 的哪些能力，使用 mermaid 画出来\". Deliver mermaid\n   as a code block (`block_type: 14`, `language: 1`) — see the descendant-write section.\n\n#### Method 2: ZIP + XML parsing (zero-dependency fallback)\n\nWhen `python-pptx` or `lxml` is broken\u002Funavailable, a PPTX is just a ZIP of XML files.\nThis method needs only `unzip` and Python stdlib `xml.etree.ElementTree` — no pip installs:\n\n```bash\n# 1. Unzip the PPTX\nmkdir -p \u002Ftmp\u002Fpptx_extract && unzip -o \u002Ftmp\u002Ffeishu_ppt.pptx -d \u002Ftmp\u002Fpptx_extract > \u002Fdev\u002Fnull 2>&1\n\n# 2. Keyword-search all slides to find the one you need\npython3 -c \"\nimport xml.etree.ElementTree as ET\nns_a = '{http:\u002F\u002Fschemas.openxmlformats.org\u002Fdrawingml\u002F2006\u002Fmain}'\nfor i in range(1, 62):  # adjust range to slide count\n    f = f'\u002Ftmp\u002Fpptx_extract\u002Fppt\u002Fslides\u002Fslide{i}.xml'\n    try:\n        root = ET.parse(f).getroot()\n    except: continue\n    texts = [t.text for t in root.iter(f'{ns_a}t') if t.text]\n    combined = ' '.join(texts)\n    if 'PCB' in combined or '超节点' in combined:  # your keywords\n        print(f'--- Slide {i} ---')\n        print(combined[:300])\n\"\n\n# 3. Extract images from a specific slide (slide 29 in this example)\npython3 -c \"\nimport xml.etree.ElementTree as ET, re\n# Parse slide XML for r:embed references\ntree = ET.parse('\u002Ftmp\u002Fpptx_extract\u002Fppt\u002Fslides\u002Fslide29.xml')\nns_r = '{http:\u002F\u002Fschemas.openxmlformats.org\u002FofficeDocument\u002F2006\u002Frelationships}'\nns_a = '{http:\u002F\u002Fschemas.openxmlformats.org\u002Fdrawingml\u002F2006\u002Fmain}'\nfor blip in tree.getroot().iter(f'{ns_a}blip'):\n    rid = blip.get(f'{ns_r}embed')\n    print(f'Image rId: {rid}')\n# Parse the rels file to map rId → media file path\nwith open('\u002Ftmp\u002Fpptx_extract\u002Fppt\u002Fslides\u002F_rels\u002Fslide29.xml.rels') as f:\n    for m in re.finditer(r'Id=\\\"([^\\\"]+)\\\".*Target=\\\"\\.\\.\u002F(media\u002F[^\\\"]+)\\\"', f.read()):\n        print(f'{m.group(1)} → {m.group(2)}')\n\"\n# Images are at \u002Ftmp\u002Fpptx_extract\u002Fppt\u002Fmedia\u002FimageNN.png — copy and deliver via MEDIA:\n```\n\nSee `references\u002Fpptx-extraction.md` for a complete worked example with image extraction.\n\n#### When image analysis isn't available\n\nIf `vision_analyze` returns generic \"I cannot see images\" responses (model limitation, not a\ntool failure), deliver the extracted images directly to the user via `MEDIA:\u002Fpath\u002Fto\u002Fimage.png`\nand explain the content textually based on the slide's extracted text. The user can see the\nimages natively in Feishu even when the model cannot analyze them.\n\n### PDF text extraction (pdf-inspector preferred, pymupdf fallback — mx001)\n\nWhen you need to extract text from a PDF file (e.g. an AIGC detection report, a paper PDF):\n\n- **Preferred: pdf-inspector** (Firecrawl Rust lib, ⭐16k — installed 2026-08-19 in the Hermes venv).\n  Classifies text\u002Fscanned\u002Fmixed (~10-50ms), extracts structured Markdown (headings\u002Ftables\u002Flists),\n  beats pymupdf4llm on opendataloader-bench (0.875 vs 0.735) at 0.1-0.5s per 20-page paper:\n  ```bash\n  # Install into the Hermes venv when pip is missing — uv works where venv has no pip:\n  uv pip install --python \u002Fhome\u002Fecs-user\u002F.hermes\u002Fhermes-agent\u002Fvenv\u002Fbin\u002Fpython pdf-inspector\n  ```\n  ```python\n  import pdf_inspector\n  r = pdf_inspector.process_pdf('\u002Fpath\u002Fto\u002Ffile.pdf')\n  print(r.pdf_type)    # text_based \u002F scanned \u002F image_based \u002F mixed\n  print(r.markdown)    # structured Markdown (or None for scanned)\n  pages = pdf_inspector.extract_pages_markdown('\u002Fpath\u002Fto\u002Ffile.pdf')  # PagesExtractionResult, NOT a list\n  # pages.pages -> list of PageMarkdown(page=N, markdown=..., needs_ocr=bool)\n  # Scanned PDFs: process_pdf_with_ocr() routes only scanned pages to PP-OCRv6\n  ```\n  Pitfalls: `extract_pages_markdown` returns a `PagesExtractionResult` object — access `.pages`;\n  `result.markdown` is `None` for scanned PDFs (use the `_with_ocr` variant).\n\n- **Fallback: pymupdf** — use system python3.10, NOT the Hermes venv python3.11 (no pip):\n  ```bash\n  python3.10 -m pip install pymupdf -q   # system python has pip\n  python3.10 -c \"\n  import pymupdf   # use 'pymupdf', NOT 'fitz' (deprecated, warns)\n  doc = pymupdf.open('\u002Fpath\u002Fto\u002Ffile.pdf')\n  for i, page in enumerate(doc):\n      text = page.get_text()\n      if text.strip():\n          print(f'--- Page {i+1} ---')\n          print(text[:3000])\n  \"\n  ```\n- `import fitz` still works but emits a deprecation warning; prefer `import pymupdf`.\n- For large PDFs, paginate with `head -N` on the output to avoid flooding context.\n- **General rule for installing Python packages into the Hermes venv** (verified 2026-08-19):\n  the venv has NO pip, but `uv pip install --python \u003Cvenv-python> \u003Cpkg>` works fine. Use it\n  instead of switching to system python when the package is needed in the agent's own venv.\n\n## References\n\n- `references\u002Ffeishu-open-api.md` — read flow (token + wiki + docx), drive upload, scopes, error codes.\n- `references\u002Ffeishu-doc-write-api.md` — doc write flow (create + block types + formatting).\n- `references\u002Fwiki-node-management.md` — wiki child node creation APIs, permission diagnostics,\n  batch block writing pattern (50-block limit, Python batch script, block construction helpers).\n- `references\u002Ffeishu-docx-descendant-write.md` — splicing content into EXISTING docs: descendant\n  endpoint (children_id + descendants), table via block_type 31\u002F32, update_text validation\n  (style+fields required), DELETE-block 404 quirk, mermaid-in-code-block pattern.\n- `references\u002Ffeishu-comment-events.md` — gateway-side automated comment auto-reply: config\n  (`feishu_comment_rules.json`), access-control policies, event flow, log diagnosis, source\n  file map.\n- `references\u002Fpptx-extraction.md` — zero-dependency PPTX text + image extraction via ZIP\u002FXML parsing (fallback when python-pptx\u002Flxml is broken).\n\n## Pitfalls\n\n- `curl` on `https:\u002F\u002F\u003Ctenant>.feishu.cn\u002Fwiki\u002F\u003Ctoken>` returns HTTP 200 but an SSO\u002Fpassport shell —\n  no doc content, no embedded JSON. Never parse it; always use the API.\n- Public-share scraping is unreliable; many tenants require login even for \"anyone with the link\".\n- If no credentials \u002F no access: ask the user to paste content or export the doc (Word\u002FPDF\u002FMD) —\n  do NOT ask them to make the doc public.\n- **Write scope ≠ write ability**: enabling `docx:document` scope in the Feishu console does NOT\n  take effect until a new app version is published (dev-mode apps). The API keeps returning\n  `code: 99991672` until published. Tell the user: 权限管理 → 勾选 → 版本管理 → 创建版本 → 发布.\n- Models in `\u002Fv1\u002Fmodels` may be listed but not callable (observed: yicloud `glm5.2-pd` returns\n  \"Invalid model name\"). Test with a real chat request, not just the models endpoint.\n- **Wiki `obj_type: file` is not a docx**: when wiki node resolution returns `obj_type: file`,\n  the `obj_token` is a drive file token — the docx `raw_content` API returns `404 \u002F 1770002`.\n  Switch to the drive download endpoint. See \"Drive file download\" section above.\n- **File download needs collaborator access, not just scope**: even with `drive:file:download`\n  scope granted and published, the app must be an explicit collaborator on each file. A `403`\n  with empty body means \"not a collaborator\" — the app cannot self-grant via the permissions\n  API (returns `1063002`). Ask the user to share the file with the bot in the Feishu UI.\n- **Wiki child node creation needs wiki space membership, not just docx scopes**: `docx:document`\n  + `docx:document:create` let the bot create standalone docs, but creating a child node under a\n  wiki page returns `code: 131006 \"permission denied: node permission denied, tenant needs edit\n  permission\"`. The bot must be a wiki space member with edit\u002Fadmin role. This is a different\n  permission from docx write scopes. See \"Wiki child node creation\" section above.\n- **Divider block requires `\"divider\": {}` field**: `{\"block_type\": 22}` alone causes\n  `code: 1770001 \"invalid param\"` that rejects the ENTIRE batch (not just the divider block).\n  Always use `{\"block_type\": 22, \"divider\": {}}`. Same pattern applies to other content-less\n  block types — include their (possibly empty) content field.\n- **Plain DELETE of a block returns 404** on this tenant: `DELETE ...\u002Fblocks\u002F\u003Cblock_id>`\n  (even with `?document_revision_id=-1`). To remove content, use `children\u002Fbatch_delete` with\n  `{\"start_index\":0,\"end_index\":N}` or PATCH-repurpose the block via `update_text`.\n- **Tables can't be created with content via the `children` endpoint**: `table.cells` is a\n  `string[]` of cell-block IDs; inlining cell blocks fails `code: 9499`. Use the `descendant`\n  endpoint (children_id + descendants, block_type 31 table \u002F 32 table_cell). See\n  `references\u002Ffeishu-docx-descendant-write.md`.\n- **`update_text` needs `style` AND `fields`**: `batch_update` PATCH returns `99992402` unless\n  the request includes `\"style\": {\"align\": 1}` and `\"fields\": [1]` alongside `elements`.\n- **No mermaid block type**: Feishu `diagram` blocks are flowchart\u002FUML only; `block_type: 35`\n  code blocks (older docs) return `1770001`. Put mermaid source in a real code block\n  (`block_type: 14`, `language: 1`).\n- **Comment reply body must be flat `content`**: POSTing to `...\u002Fcomments\u002F\u003Cid>\u002Freplies` with\n  `{\"reply_list\": {\"replies\": [{\"content\": ...}]}}` returns `99992402 \"content is required\"`.\n  Use `{\"content\": {\"elements\": [{\"type\": \"text_run\", \"text_run\": {\"text\": \"...\"}}]}}` directly.\n- **Missing `feishu_comment_rules.json` = silent denial**: if the rules file does not exist,\n  the code defaults to `policy=\"pairing\"` + empty `allow_from`, which denies ALL comment\n  events. The gateway log shows `User ... denied (policy=pairing, rule=top)`. Always create\n  the rules file with `policy: \"allowlist\"` and the user's `open_id` before testing comment\n  auto-reply. See \"Automated comment event handling\" section above.\n",{"name":5,"license":15,"version":24,"metadata":25,"description":7},"1.2.0",{"hermes":26},{"tags":27},[28,29,30,31,32,33,34,35],"feishu","lark","docs","api","drive","upload","write","create","main","c0b220603dea88e986e5b31268098ef2f5b07fd0","productivity\u002Ffeishu-docs","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need","https:\u002F\u002Fgithub.com\u002Fpeterlau123","A software engineer in deep learning\r\n","2026-08-19 16:46:00",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add peterlau123\u002Fskills-you-need --skill feishu-docs",{"tool":49,"command":50},"bunx","bunx skills add peterlau123\u002Fskills-you-need --skill feishu-docs",{"tool":52,"command":53},"pnpm","pnpm dlx skills add peterlau123\u002Fskills-you-need --skill feishu-docs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fproductivity\u002Ffeishu-docs\u002FSKILL.md",true,[57,63,67,71,75,79],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Ffeishu-comment-events.md","REFERENCE","参考文档",7100,"https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fproductivity\u002Ffeishu-docs\u002Freferences\u002Ffeishu-comment-events.md",{"path":64,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Ffeishu-doc-write-api.md",3876,"https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fproductivity\u002Ffeishu-docs\u002Freferences\u002Ffeishu-doc-write-api.md",{"path":68,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Ffeishu-docx-descendant-write.md",5899,"https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fproductivity\u002Ffeishu-docs\u002Freferences\u002Ffeishu-docx-descendant-write.md",{"path":72,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Ffeishu-open-api.md",5642,"https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fproductivity\u002Ffeishu-docs\u002Freferences\u002Ffeishu-open-api.md",{"path":76,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fpptx-extraction.md",4322,"https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fproductivity\u002Ffeishu-docs\u002Freferences\u002Fpptx-extraction.md",{"path":80,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fwiki-node-management.md",7357,"https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fproductivity\u002Ffeishu-docs\u002Freferences\u002Fwiki-node-management.md",[84,91,98,105,112,119],{"skillNo":85,"name":86,"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":19},"01M7AVH2D16QBRC8T2P6SVXSTS","jekyll-chirpy-blog","Use when editing the Jekyll\u002FChirpy blog or fixing mermaid.","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fweb\u002Fjekyll-chirpy-blog\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7AVGYYFDK4GKCSNHBCP59Y6","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fsoftware-development\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7AVGT9GAVB5EBKZ2616R27Z","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fsoftware-development\u002Fsystematic-debugging\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7AVGQ23T5EHRQP5GZ45KZC5","spike","Throwaway experiments to validate an idea before build.","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fsoftware-development\u002Fspike\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7AVGKZ0ZD91ATKD9QB44E1B","simplify-code","Parallel 4-agent cleanup of recent code changes.","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fsoftware-development\u002Fsimplify-code\u002FSKILL.md",[],[],{"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":19},"01M7AVGFBR76BWQNG2X4CN5SQT","requesting-code-review","Pre-commit review: security scan, quality gates, auto-fix.","https:\u002F\u002Fgithub.com\u002Fpeterlau123\u002Fskills-you-need\u002Fblob\u002Fmain\u002Fsoftware-development\u002Frequesting-code-review\u002FSKILL.md",[],[]]