@renkosky/lark-fe-skills 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,445 @@
1
+ # Lark FE Task
2
+
3
+ English | [中文](#中文)
4
+
5
+ ## English
6
+
7
+ ### Table of Contents
8
+
9
+ - [Overview](#overview)
10
+ - [What It Does](#what-it-does)
11
+ - [When to Use](#when-to-use)
12
+ - [Prerequisites](#prerequisites)
13
+ - [Usage](#usage)
14
+ - [Configuration](#configuration)
15
+ - [List Configured Repositories](#list-configured-repositories)
16
+ - [Planning Command](#planning-command)
17
+ - [Output](#output)
18
+ - [Files](#files)
19
+ - [Roadmap](#roadmap)
20
+ - [Notes](#notes)
21
+
22
+ ### Overview
23
+
24
+ `lark-fe-task` is a Codex skill for turning Lark/Feishu requirement documents into concrete frontend task breakdowns.
25
+
26
+ It reads a Lark document by title, URL, or token, extracts the requirement content, inspects the configured frontend project path or paths enough to locate likely implementation areas, and writes a Markdown task plan under the configured output directory.
27
+
28
+ ### What It Does
29
+
30
+ - Finds and reads Lark/Feishu requirement documents.
31
+ - Supports one frontend project or multiple frontend projects in a monorepo.
32
+ - Treats browser-based public sites, admin consoles, and other web frontends as frontend projects when configured.
33
+ - Ignores native App or mobile-only content unless it affects shared browser frontend behavior.
34
+ - Splits requirements into actionable frontend tasks.
35
+ - Includes code-location clues, dependencies, acceptance checks, and open questions.
36
+ - Writes the final task breakdown as a Markdown file.
37
+
38
+ ### When to Use
39
+
40
+ Use this skill when you have a Lark/Feishu PRD, requirement document, or product spec and want Codex to create a frontend development task breakdown.
41
+
42
+ Example prompts:
43
+
44
+ ```text
45
+ [$lark-fe-task](path/to/SKILL.md) +plan <Lark document title>
46
+ ```
47
+
48
+ ```text
49
+ Use lark-fe-task to split this Lark PRD into FE tasks: <Lark document URL>
50
+ ```
51
+
52
+ ### Prerequisites
53
+
54
+ Install and configure `lark-cli` before using this skill:
55
+
56
+ ```bash
57
+ npm install -g @larksuite/cli
58
+ lark-cli config init
59
+ lark-cli auth login --recommend
60
+ ```
61
+
62
+ Official lark-cli documentation: <https://github.com/larksuite/cli/tree/main>
63
+
64
+ If `lark-cli` is not installed or not available in `PATH`, the helper scripts will stop and ask you to install it first.
65
+
66
+ ### Usage
67
+
68
+ Reference the skill in Codex and provide a Lark document title, URL, or token.
69
+
70
+ Codex will:
71
+
72
+ 1. Locate the document with `lark-cli`.
73
+ 2. Fetch the document content as Markdown.
74
+ 3. Choose the affected configured frontend project path.
75
+ 4. Inspect relevant files under that project path.
76
+ 5. Generate a task breakdown Markdown file.
77
+
78
+ ### Configuration
79
+
80
+ Run the config workflow once per repository. In Codex, reference the skill and use `+config`:
81
+
82
+ ```text
83
+ [$lark-fe-task](path/to/SKILL.md) +config
84
+ ```
85
+
86
+ You can also provide the values directly:
87
+
88
+ ```text
89
+ [$lark-fe-task](path/to/SKILL.md) +config <repo-root> <fe-project-paths> [output-dir]
90
+ ```
91
+
92
+ If the frontend paths are omitted, Codex should inspect the repository lightly, propose likely frontend project paths, and ask you to confirm before writing config.
93
+
94
+ The underlying helper command is:
95
+
96
+ ```bash
97
+ "$HOME/.codex/skills/lark-fe-task/scripts/config.sh" "<repo-root>" "<fe-project-paths>" "docs/frontend-tasks"
98
+ ```
99
+
100
+ For a monorepo, pass comma-separated frontend project paths:
101
+
102
+ ```bash
103
+ "$HOME/.codex/skills/lark-fe-task/scripts/config.sh" "$(pwd)" "apps/web,apps/admin" "docs/frontend-tasks"
104
+ ```
105
+
106
+ For a single frontend project repository, use `.`:
107
+
108
+ ```bash
109
+ "$HOME/.codex/skills/lark-fe-task/scripts/config.sh" "$(pwd)" "." "docs/frontend-tasks"
110
+ ```
111
+
112
+ This writes:
113
+
114
+ ```text
115
+ <repo-root>/.lark-fe-task/config.env
116
+ $HOME/.codex/skills/lark-fe-task/config/repos.json
117
+ ```
118
+
119
+ The repository-local config is the source for the current repo. The global registry is an index for listing configured repositories and for fallback selection when `+plan` is run outside a configured repo.
120
+
121
+ Because repository-local config contains machine-specific paths, `+config` also ensures `.lark-fe-task/` is listed in the repository `.gitignore`.
122
+
123
+ Both store:
124
+
125
+ - repository root
126
+ - frontend project path or paths
127
+ - output directory
128
+
129
+ ### List Configured Repositories
130
+
131
+ To show all configured repositories, use:
132
+
133
+ ```text
134
+ [$lark-fe-task](path/to/SKILL.md) +list
135
+ ```
136
+
137
+ The underlying helper command is:
138
+
139
+ ```bash
140
+ "$HOME/.codex/skills/lark-fe-task/scripts/list-configs.sh"
141
+ ```
142
+
143
+ This reads the global registry only. It does not scan your home directory.
144
+
145
+ ### Planning Command
146
+
147
+ To create a task plan from a Lark document, use:
148
+
149
+ ```text
150
+ [$lark-fe-task](path/to/SKILL.md) +plan <Lark document title, URL, or token>
151
+ ```
152
+
153
+ The underlying helper command is:
154
+
155
+ ```bash
156
+ "$HOME/.codex/skills/lark-fe-task/scripts/plan-lark-doc.sh" "<document-title-or-url-or-token>" "<repo-root>"
157
+ ```
158
+
159
+ The command fetches the Lark document and prints:
160
+
161
+ - the resolved document reference
162
+ - configured frontend project paths
163
+ - the suggested output path
164
+ - the fetched Markdown content
165
+
166
+ Codex then chooses the affected frontend project path, inspects code, and writes the final plan.
167
+
168
+ When no repo root is provided, the command first looks for a repository-local config by walking upward from the current directory. If none exists, it reads the global registry. If exactly one repository is registered, it uses that repository; if multiple repositories are registered, Codex should ask which one to use.
169
+
170
+ ### Output
171
+
172
+ Default output path:
173
+
174
+ ```text
175
+ <repo-root>/<output-dir>/<YYYY-MM-DD>-<requirement-id>.md
176
+ ```
177
+
178
+ When the document title contains an issue ID such as `PR-00000`, the filename uses only that ID, for example `2026-05-15-pr-00000.md`. If no issue ID exists, it falls back to a short document title slug.
179
+
180
+ Before writing the Markdown file, the skill ensures the configured output directory is listed in `<repo-root>/.gitignore`, for example `docs/frontend-tasks/`.
181
+
182
+ The generated Markdown includes:
183
+
184
+ - document metadata
185
+ - requirement summary
186
+ - affected frontend scope
187
+ - frontend task list
188
+ - dependency order
189
+ - acceptance criteria
190
+ - open questions
191
+
192
+ ### Files
193
+
194
+ ```text
195
+ lark-fe-task/
196
+ ├── SKILL.md
197
+ ├── README.md
198
+ ├── agents/
199
+ │ └── openai.yaml
200
+ ├── config/
201
+ │ └── repos.json
202
+ ├── references/
203
+ │ └── task-breakdown-template.md
204
+ └── scripts/
205
+ ├── config.sh
206
+ ├── list-configs.sh
207
+ └── plan-lark-doc.sh
208
+ ```
209
+
210
+ ### Roadmap
211
+
212
+ This skill implements Phase 1: generating frontend task breakdown Markdown from Lark requirement documents.
213
+
214
+ For the full `lark-fe-skills` project roadmap, see the root README.
215
+
216
+ ### Notes
217
+
218
+ - `SKILL.md` is the behavior definition used by Codex.
219
+ - `README.md` is for human readers and GitHub documentation.
220
+ - The helper scripts depend on `lark-cli` being installed, configured, and authorized.
221
+ - Repository-local config is kept in `.lark-fe-task/config.env`; the global `repos.json` is only an index and should not be edited manually.
222
+ - This skill plans frontend tasks only; it does not implement code changes.
223
+ - If multiple configured frontend paths could match a requirement, Codex should ask which path to use before writing the final task file.
224
+
225
+ ---
226
+
227
+ ## 中文
228
+
229
+ ### 目录
230
+
231
+ - [概览](#概览)
232
+ - [功能](#功能)
233
+ - [适用场景](#适用场景)
234
+ - [前置条件](#前置条件)
235
+ - [使用方式](#使用方式)
236
+ - [配置](#配置)
237
+ - [查看已配置仓库](#查看已配置仓库)
238
+ - [生成计划命令](#生成计划命令)
239
+ - [输出结果](#输出结果)
240
+ - [文件结构](#文件结构)
241
+ - [开发规划](#开发规划)
242
+ - [注意事项](#注意事项)
243
+
244
+ ### 概览
245
+
246
+ `lark-fe-task` 是一个 Codex skill,用于把 Lark/飞书需求文档拆解成可开发的前端任务。
247
+
248
+ 它可以根据文档标题、链接或 token 读取 Lark 文档,提取需求内容,适度检查已配置的前端项目路径,然后在已配置的输出目录下生成 Markdown 任务拆分文档。
249
+
250
+ ### 功能
251
+
252
+ - 查找并读取 Lark/飞书需求文档。
253
+ - 支持单前端项目,也支持 monorepo 下多个前端项目。
254
+ - 已配置时,前台站点、后台管理端、运营后台等浏览器端项目都可以算前端项目。
255
+ - 默认忽略原生 App 或移动端专属内容,除非这些内容影响浏览器端前端共用逻辑。
256
+ - 将需求拆成可直接开发的前端子任务。
257
+ - 输出代码定位线索、依赖顺序、验收点和待确认问题。
258
+ - 将最终任务拆分写成 Markdown 文件。
259
+
260
+ ### 适用场景
261
+
262
+ 当你有 Lark/飞书 PRD、需求文档或产品说明,并希望 Codex 生成前端开发任务拆分时,使用这个 skill。
263
+
264
+ 示例:
265
+
266
+ ```text
267
+ [$lark-fe-task](path/to/SKILL.md) +plan <飞书文档标题>
268
+ ```
269
+
270
+ ```text
271
+ 使用 lark-fe-task 把这个飞书 PRD 拆成前端任务:<飞书文档链接>
272
+ ```
273
+
274
+ ### 前置条件
275
+
276
+ 使用这个 skill 前,需要先安装并配置 `lark-cli`:
277
+
278
+ ```bash
279
+ npm install -g @larksuite/cli
280
+ lark-cli config init
281
+ lark-cli auth login --recommend
282
+ ```
283
+
284
+ 官方 lark-cli 文档:<https://github.com/larksuite/cli/tree/main>
285
+
286
+ 如果本地没有安装 `lark-cli`,或者它不在 `PATH` 中,辅助脚本会停止并提示先安装。
287
+
288
+ ### 使用方式
289
+
290
+ 在 Codex 中引用这个 skill,并提供 Lark 文档标题、链接或 token。
291
+
292
+ Codex 会:
293
+
294
+ 1. 使用 `lark-cli` 定位文档。
295
+ 2. 将文档内容读取为 Markdown。
296
+ 3. 判断命中的已配置前端项目路径。
297
+ 4. 检查该项目路径下的相关代码位置。
298
+ 5. 生成前端任务拆分 Markdown 文件。
299
+
300
+ ### 配置
301
+
302
+ 每个仓库先运行一次配置流程。在 Codex 里引用 skill 并使用 `+config`:
303
+
304
+ ```text
305
+ [$lark-fe-task](path/to/SKILL.md) +config
306
+ ```
307
+
308
+ 也可以直接带上配置值:
309
+
310
+ ```text
311
+ [$lark-fe-task](path/to/SKILL.md) +config <repo-root> <fe-project-paths> [output-dir]
312
+ ```
313
+
314
+ 如果没有提供前端项目路径,Codex 应该轻量检查仓库,给出可能的前端项目路径,并在写入配置前让你确认。
315
+
316
+ 底层辅助命令是:
317
+
318
+ ```bash
319
+ "$HOME/.codex/skills/lark-fe-task/scripts/config.sh" "<repo-root>" "<fe-project-paths>" "docs/frontend-tasks"
320
+ ```
321
+
322
+ monorepo 可以传多个前端项目路径,用英文逗号分隔:
323
+
324
+ ```bash
325
+ "$HOME/.codex/skills/lark-fe-task/scripts/config.sh" "$(pwd)" "apps/web,apps/admin" "docs/frontend-tasks"
326
+ ```
327
+
328
+ 如果仓库本身就是单个前端项目,可以使用 `.`:
329
+
330
+ ```bash
331
+ "$HOME/.codex/skills/lark-fe-task/scripts/config.sh" "$(pwd)" "." "docs/frontend-tasks"
332
+ ```
333
+
334
+ 它会写入:
335
+
336
+ ```text
337
+ <repo-root>/.lark-fe-task/config.env
338
+ $HOME/.codex/skills/lark-fe-task/config/repos.json
339
+ ```
340
+
341
+ 仓库内配置用于当前项目;全局 registry 用于查看已经配置过哪些仓库,也用于在 `+plan` 不在已配置仓库内执行时做兜底选择。
342
+
343
+ 因为仓库内配置包含本机路径,`+config` 也会确保 `.lark-fe-task/` 已加入仓库 `.gitignore`。
344
+
345
+ 两处都会记录:
346
+
347
+ - 仓库根目录
348
+ - 前端项目路径
349
+ - 输出目录
350
+
351
+ ### 查看已配置仓库
352
+
353
+ 查看所有已配置仓库:
354
+
355
+ ```text
356
+ [$lark-fe-task](path/to/SKILL.md) +list
357
+ ```
358
+
359
+ 底层辅助命令是:
360
+
361
+ ```bash
362
+ "$HOME/.codex/skills/lark-fe-task/scripts/list-configs.sh"
363
+ ```
364
+
365
+ 这个命令只读取全局 registry,不会扫描用户目录。
366
+
367
+ ### 生成计划命令
368
+
369
+ 根据 Lark 文档生成任务拆分:
370
+
371
+ ```text
372
+ [$lark-fe-task](path/to/SKILL.md) +plan <飞书文档标题、链接或 token>
373
+ ```
374
+
375
+ 底层辅助命令是:
376
+
377
+ ```bash
378
+ "$HOME/.codex/skills/lark-fe-task/scripts/plan-lark-doc.sh" "<文档标题或链接或token>" "<repo-root>"
379
+ ```
380
+
381
+ 这个命令会读取 Lark 文档,并输出:
382
+
383
+ - 解析后的文档引用
384
+ - 已配置的前端项目路径
385
+ - 建议的输出路径
386
+ - 拉取到的 Markdown 原文
387
+
388
+ 随后 Codex 会判断受影响的前端项目路径、检查代码,并写出最终任务拆分文档。
389
+
390
+ 如果没有传 repo root,命令会先从当前目录向上查找仓库内配置;如果没找到,再读取全局 registry。registry 只有一个仓库时会默认使用它;有多个仓库时,Codex 应先询问用户选择哪个仓库。
391
+
392
+ ### 输出结果
393
+
394
+ 默认输出路径:
395
+
396
+ ```text
397
+ <repo-root>/<output-dir>/<YYYY-MM-DD>-<requirement-id>.md
398
+ ```
399
+
400
+ 当文档标题里包含 `PR-00000` 这类需求编号时,文件名只使用该编号,例如 `2026-05-15-pr-00000.md`。如果没有需求编号,再回退到短标题 slug。
401
+
402
+ 写入 Markdown 前,skill 会确保配置的输出目录已经加入 `<repo-root>/.gitignore`,例如 `docs/frontend-tasks/`。
403
+
404
+ 生成的 Markdown 包含:
405
+
406
+ - 文档信息
407
+ - 需求概览
408
+ - 影响范围
409
+ - 前端子任务列表
410
+ - 依赖与开发顺序
411
+ - 验收标准
412
+ - 待确认问题
413
+
414
+ ### 文件结构
415
+
416
+ ```text
417
+ lark-fe-task/
418
+ ├── SKILL.md
419
+ ├── README.md
420
+ ├── agents/
421
+ │ └── openai.yaml
422
+ ├── config/
423
+ │ └── repos.json
424
+ ├── references/
425
+ │ └── task-breakdown-template.md
426
+ └── scripts/
427
+ ├── config.sh
428
+ ├── list-configs.sh
429
+ └── plan-lark-doc.sh
430
+ ```
431
+
432
+ ### 开发规划
433
+
434
+ 这个 skill 实现 Phase 1:根据 Lark 需求文档生成前端任务拆分 Markdown。
435
+
436
+ 完整的 `lark-fe-skills` 项目路线图请查看根目录 README。
437
+
438
+ ### 注意事项
439
+
440
+ - `SKILL.md` 是 Codex 使用的行为定义。
441
+ - `README.md` 是给人阅读的 GitHub 说明文档。
442
+ - 辅助脚本依赖已经安装、配置并授权的 `lark-cli`。
443
+ - 仓库内配置保存在 `.lark-fe-task/config.env`;全局 `repos.json` 只是索引,不需要手动编辑。
444
+ - 这个 skill 只负责拆解前端任务,不负责实现代码改动。
445
+ - 如果多个已配置前端路径都可能匹配同一份需求,Codex 应先询问用户选择哪个路径,再写最终任务文件。
@@ -0,0 +1,178 @@
1
+ ---
2
+ name: lark-fe-task
3
+ description: Turn Feishu/Lark requirement documents into concrete frontend task breakdowns. Use when the user provides a Lark document title, URL, or token and asks to read a PRD, requirement doc, or product spec and split it into FE development tasks for configured frontend project paths; supports +config, +list, and +plan shortcuts.
4
+ ---
5
+
6
+ # Lark FE Task
7
+
8
+ ## Overview
9
+
10
+ Use this skill to produce a development-ready FE task breakdown from a Feishu/Lark requirement document. Phase 1 only plans tasks and writes a Markdown task file; it does not implement code changes.
11
+
12
+ Default repo root: the current repository root, referred to below as `<repo-root>`
13
+ Default output directory: `docs/frontend-tasks`
14
+ Global repository registry: `$HOME/.codex/skills/lark-fe-task/config/repos.json`
15
+
16
+ ## Prerequisite
17
+
18
+ Before using `+config` or `+plan`, make sure `lark-cli` is installed, configured, and authorized:
19
+
20
+ ```bash
21
+ npm install -g @larksuite/cli
22
+ lark-cli config init
23
+ lark-cli auth login --recommend
24
+ ```
25
+
26
+ Official lark-cli documentation: <https://github.com/larksuite/cli/tree/main>
27
+
28
+ If `lark-cli` is missing, the helper scripts must stop and tell the user to install and configure it first.
29
+
30
+ ## Shortcuts
31
+
32
+ ### +config
33
+
34
+ Use `+config` when the user wants to initialize or update the repository settings for this skill. Treat prompts such as `+config`, `配置 lark-fe-task`, or `设置前端项目路径` as requests to run the configuration workflow, not as requests to generate a task breakdown.
35
+
36
+ Run it once per repository before planning tasks. It records the repository root, frontend project path or paths, and output directory in both places:
37
+
38
+ - `<repo-root>/.lark-fe-task/config.env`: repository-local config.
39
+ - `$HOME/.codex/skills/lark-fe-task/config/repos.json`: global registry used for listing and fallback selection.
40
+
41
+ Because repository-local config contains machine-specific paths, `+config` must ensure `<repo-root>/.gitignore` contains `.lark-fe-task/`.
42
+
43
+ Accepted Codex invocation:
44
+
45
+ ```text
46
+ +config <repo-root> <fe-project-paths> [output-dir]
47
+ ```
48
+
49
+ Examples:
50
+
51
+ ```text
52
+ +config 当前仓库 apps/web,apps/admin
53
+ +config /path/to/repo . docs/frontend-tasks
54
+ ```
55
+
56
+ When the user provides incomplete arguments:
57
+
58
+ - Infer `<repo-root>` from the current working directory by walking up to the nearest git/workspace root when possible.
59
+ - If frontend paths are not provided, inspect the repo lightly and propose likely FE project paths; ask the user to confirm before writing config.
60
+ - Use `docs/frontend-tasks` as the default output directory unless the user provides another path.
61
+
62
+ Recommended invocation:
63
+
64
+ ```bash
65
+ "$HOME/.codex/skills/lark-fe-task/scripts/config.sh" "<repo-root>" "<fe-project-paths>" "docs/frontend-tasks"
66
+ ```
67
+
68
+ Example only:
69
+
70
+ ```bash
71
+ "$HOME/.codex/skills/lark-fe-task/scripts/config.sh" "$(pwd)" "apps/web,apps/admin" "docs/frontend-tasks"
72
+ ```
73
+
74
+ If the user has not configured the repository, ask for or infer these values before producing a task breakdown.
75
+
76
+ ### +list
77
+
78
+ Use `+list` when the user asks which repositories are configured, for example `目前配置了哪些仓库`.
79
+
80
+ Recommended invocation:
81
+
82
+ ```bash
83
+ "$HOME/.codex/skills/lark-fe-task/scripts/list-configs.sh"
84
+ ```
85
+
86
+ Do not scan the user's home directory to answer this. Read the global registry instead. If the registry does not exist or is empty, tell the user no repositories are configured yet and show the `+config` usage.
87
+
88
+ ### +plan
89
+
90
+ Use `+plan` when the user wants to split a Lark requirement document into FE development tasks.
91
+
92
+ Accepted inputs:
93
+
94
+ - Lark document URL
95
+ - Lark document token
96
+ - Document title, for example `【PR-00000】示例前端需求标题`
97
+
98
+ Recommended invocation:
99
+
100
+ ```bash
101
+ "$HOME/.codex/skills/lark-fe-task/scripts/plan-lark-doc.sh" "<document-title-or-url-or-token>" "<repo-root>"
102
+ ```
103
+
104
+ The helper command resolves config in this order, fetches the document Markdown with `lark-cli`, and prints the source content plus the configured FE project paths and target output path:
105
+
106
+ 1. If a repo root argument is provided, read `<repo-root>/.lark-fe-task/config.env`.
107
+ 2. If no repo root is provided, walk upward from the current directory to find `.lark-fe-task/config.env`.
108
+ 3. If no local config is found, read the global registry.
109
+ 4. If the registry has exactly one repo, use it.
110
+ 5. If the registry has multiple repos, stop and ask the user which repo root to use.
111
+
112
+ Then follow the workflow below to inspect the relevant configured FE project path and write the final task breakdown Markdown.
113
+
114
+ ## Workflow
115
+
116
+ 1. Locate the source document.
117
+ - If the user gives a Feishu/Lark URL or token, fetch it directly with `lark-cli docs +fetch --as user --api-version v2 --doc "<url-or-token>" --doc-format markdown`.
118
+ - If the user gives a title, search with `lark-cli drive +search --as user --query "<title>" --doc-types docx,doc,wiki --page-size 20 --format json`.
119
+ - Prefer broad keyword search over `intitle:` when exact title search misses Wiki/DOCX results.
120
+ - When multiple results appear, prefer the exact title without `副本`; prefer non-cross-tenant results unless the user explicitly asks for an external/copy document.
121
+
122
+ 2. Read the document fully.
123
+ - Fetch the selected document in Markdown.
124
+ - If the document is inaccessible, unreadable, partial, or image/PDF-only without extractable text, stop and ask the user for a readable source before planning.
125
+ - If fetched content contains embedded docs such as `<cite ... token="...">`, only follow them when they are required to understand the requested requirement.
126
+ - Ignore native App/mobile-only sections unless they affect browser-based FE behavior; this skill plans browser/admin/frontend project work in the configured FE project paths.
127
+
128
+ 3. Decide the affected FE project path.
129
+ - If the document clearly names a configured project path or business surface, use that path.
130
+ - In a monorepo, configured FE paths may include multiple projects such as a public web app and admin apps.
131
+ - If the document points to a FE project that is not configured, or if multiple configured paths are plausible, ask the user which project path to include before writing the final Markdown.
132
+ - For a non-monorepo project, the configured FE path may be `.`.
133
+
134
+ 4. Inspect the repository just enough to ground the plan.
135
+ - Check likely affected FE entrypoints under the selected configured FE project path or paths.
136
+ - Use `rg`/`rg --files` to find existing pages, components, services, stores, i18n, permissions, and tracking patterns mentioned by the requirement.
137
+ - Do not edit app code in this phase.
138
+
139
+ 5. Write the task breakdown Markdown.
140
+ - Use `references/task-breakdown-template.md`.
141
+ - Before writing, ensure `<repo-root>/.gitignore` contains the configured output directory, for example `docs/frontend-tasks/`; append it if missing so generated task files are not committed.
142
+ - Save to `<repo-root>/<output-dir>/<YYYY-MM-DD>-<requirement-id>.md` when the document title contains an issue ID such as `PR-00000`.
143
+ - If no issue ID exists, save to `<repo-root>/<output-dir>/<YYYY-MM-DD>-<document-title-slug>.md`.
144
+ - Use lowercase ASCII filenames; keep the slug short and avoid adding extra business keywords when an issue ID is available.
145
+
146
+ ## Task Rules
147
+
148
+ - Split work into tasks that are directly actionable for a frontend engineer.
149
+ - Only include affected configured FE project paths/modules/pages. Do not write "not involved" rows for projects that are out of scope.
150
+ - Treat browser-based public sites, admin consoles, and other web frontends as FE projects when they are configured.
151
+ - Ignore native App/mobile-only content unless it clarifies shared browser FE requirements.
152
+ - Group tasks by FE project path first when multiple configured projects are involved, then by user flow or feature area.
153
+ - Every task must include: goal, affected FE scope, code-location clues, main changes, API/data/i18n/permission/tracking impact, acceptance checks, and dependencies.
154
+ - Preserve product details from the document, especially modal behavior, validation order, state transitions, permission gates, routing, empty/loading/error states, and cross-project dependencies.
155
+ - Put uncertain product behavior or missing backend contracts in `待确认问题`; do not invent behavior to make the plan look complete.
156
+ - If the document is onboarding/reference material rather than a feature requirement, say so and produce a short reference-oriented breakdown instead of inventing development tasks.
157
+
158
+ ## Verification
159
+
160
+ Before finishing, verify:
161
+
162
+ - The Markdown file exists in `docs/frontend-tasks`.
163
+ - The output directory is ignored by `<repo-root>/.gitignore`.
164
+ - The task list is concrete enough to implement without rereading the source document for basic sequencing.
165
+ - No app source files were changed.
166
+ - Any missing requirement details are listed under `待确认问题`.
167
+
168
+ ## TODO / Roadmap
169
+
170
+ Planned but not implemented yet:
171
+
172
+ - Phase 2: turn generated frontend task Markdown into Lark schedule tasks.
173
+ - Parse tasks from generated Markdown files, using `#### Task N: ...` sections as the initial task boundary.
174
+ - Accept a Lark schedule Base URL or title, because different teams store schedules in different places.
175
+ - Read the target Base schema before mapping fields, including task name, task description, task status, start time, and end time.
176
+ - Read custom task status options from the Base; do not invent status tags.
177
+ - First implementation should be dry-run only: show the mapped records that would be created, but do not write to Lark.
178
+ - Later implementation can add a confirmation step and then create records in the schedule Base.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Lark FE Task"
3
+ short_description: "Break Lark requirement docs into frontend task Markdown."
4
+ default_prompt: "根据我提供的飞书文档名称、链接或 token,读取需求并生成前端可开发任务拆分 Markdown。"
@@ -0,0 +1,4 @@
1
+ {
2
+ "version": 1,
3
+ "repos": []
4
+ }
@@ -0,0 +1,63 @@
1
+ # Frontend Task Breakdown Template
2
+
3
+ Use this template for the generated Markdown file. Keep wording concise, but include enough detail for another engineer or agent to implement the tasks directly.
4
+
5
+ ```markdown
6
+ # <Document Title> - Frontend Task Breakdown
7
+
8
+ ## 文档信息
9
+
10
+ - 来源: <document title / URL / token>
11
+ - 生成日期: <YYYY-MM-DD>
12
+ - 影响项目: <configured FE project path(s)>
13
+ - 需求类型: <feature / optimization / bugfix / onboarding-reference / unknown>
14
+
15
+ ## 需求概览
16
+
17
+ <Summarize the user-visible or operator-visible requirement in 3-6 bullets. Include the main user flow and business goal.>
18
+
19
+ ## 影响范围
20
+
21
+ Only list affected FE project paths, modules, or pages. Do not include rows for projects/modules that are not involved.
22
+
23
+ | 范围 | 判断依据 |
24
+ | --- | --- |
25
+ | <fe-project-path> <module/page> | <evidence from doc or repo inspection> |
26
+
27
+ ## 前端子任务列表
28
+
29
+ ### <fe-project-path>
30
+
31
+ #### Task 1: <Actionable task title>
32
+
33
+ - 任务目标: <what should be implemented>
34
+ - 影响范围: `<fe-project-path module/page>`
35
+ - 入口或代码定位线索: <routes/components/services/stores/i18n/tracking clues>
36
+ - 主要改动点:
37
+ - <specific UI/state/data change>
38
+ - <specific UI/state/data change>
39
+ - 接口/数据/i18n/权限/埋点影响: <API contracts, payloads, translations, auth, permissions, analytics>
40
+ - 验收点:
41
+ - <observable acceptance criterion>
42
+ - <observable acceptance criterion>
43
+ - 前置依赖: <none or task/API/design dependency>
44
+
45
+ ## 依赖与开发顺序
46
+
47
+ 1. <First task or dependency>
48
+ 2. <Second task or dependency>
49
+ 3. <Final verification task>
50
+
51
+ ## 验收标准
52
+
53
+ - <Cross-task acceptance criterion>
54
+ - <Cross-task acceptance criterion>
55
+
56
+ ## 待确认问题
57
+
58
+ - <Question about ambiguous product behavior, missing API, unclear permissions, or missing design>
59
+ ```
60
+
61
+ When the document is not a feature PRD, keep the same headings but mark `需求类型` as `onboarding-reference` or `unknown`, keep the task list short, and explicitly state that no implementation tasks should be invented from reference-only content.
62
+
63
+ Ignore native App/mobile-only requirements unless they define shared browser FE behavior. The generated breakdown should only cover configured FE project paths.