After loading the workflow, resolve the references/、scripts/、templates/、examples/ relative paths according to that
workflow.md directory; when executing scripts, use the resolved actual paths, do not rely on the current shell directory.
Select the following carriers only when the target is a Feishu artifact; when the user only wants local files, keep the original delivery method. When the Feishu carrier is not yet determined, read dataviz first; when the carrier is already clear, directly read the corresponding workflow.
Routing
| Intent | Read file |
|---|---|
| Data charts, color schemes and form selection when no carrier is specified | references/workflows/dataviz/workflow.md |
| Static board: SVG/Mermaid/PlantUML import, handwritten nodes, retrieve source code, clone, quality check, export | references/workflows/board/workflow.md |
| Slides presentation/PPT: create, read XML, add/delete/modify by page, screenshot preview, upload images | references/workflows/slides/workflow.md |
| In-document dynamic, interactive, CSS/JS, ECharts, 3D, window.magic mini programs | references/workflows/htmlbox/workflow.md |
| Miaoda HTML app: create, publish, check publish status, access scope | references/workflows/apps/workflow.md |
Carrier boundaries
- Dynamic or interactive within a Feishu document: htmlbox.
- Feishu static board with editable nodes: board.
- Feishu presentation: slides.
- User requests publishing as a Miaoda HTML app: apps.
- For message notification cards:
feishu-cli-messagingthe card workflow.
Execution rules
- Identity:board、
doc htmlbox, slides write commands default to Bot; when operating on a user's existing document, board or presentation, explicitly pass--user-access-token(orFEISHU_USER_ACCESS_TOKEN). For creating Slides, prefer User: when the app has not enabled tenant'sslides:presentation:create, Bot creation reports 99991672 (exit 3).appsAll commands must use User Token + spark scope. - Ask the user first for destructive operations:
board delete、slides delete-slide, before setting the Miaoda app to--scope public, confirm with the user first.board import/update/create-notes --overwritewill clear the entire board (including other charts),board update --overwritefirst add--snapshot old.jsonto keep a backup;board deletehas no confirmation gate and executes immediately. When a deletion-type command returns with exit code 10, it is waiting for confirmation, do not add--yeson your own; obtain the user's consent first. - Do not write repeatedly: when the board write result is unclear,
board update/svg-import/create-notes/import --engine localrerun with the same--client-token; the serverboard importdoes not accept client token (the CLI reads back for deduplication before automatic retry), after a command fails, to rerun first useboard nodesto confirm that the last attempt did not take effect. - Miaoda publishing requires explicit user consent: first
apps html-publish --dry-run, confirmwould_block=false;--waitorapps release getseefinishedbefore publishing is considered complete,online_urlis visible only to the creator by default. - Self-check after going live: for boards use
board imageto view thumbnails (may lag 10–20 seconds after writing), for Slides useslides screenshot, before HTMLBox is persisted runverify.sh; after changing the color palette or background color, run the dataviz validation script; if you use an already-validated color palette as-is, no repeated validation is needed.
Themes and styles are default options; prioritize satisfying the user-specified brand colors, light/dark themes, and medium, and verify readability.
When delete- or overwrite-type commands return exit code 10, confirm the target and impact with the user, then append the global --yes and rerun; do not add it yourself. For identity or scope errors (such as 99991663/99991668/99991672/99991679), read ../feishu-cli-platform/references/workflows/auth/references/identity.md; to determine success or failure, write scripts, or handle confirmation gates, read ../feishu-cli-platform/references/workflows/auth/references/agent-contract.md。