@renkosky/lark-fe-skills 0.1.0 → 0.1.1
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.
- package/README.md +95 -29
- package/bin/lark-fe-skills.js +30 -8
- package/package.json +1 -1
- package/skills/{lark-fe-task → prd-fe-task}/README.md +29 -29
- package/skills/{lark-fe-task → prd-fe-task}/SKILL.md +9 -9
- package/skills/{lark-fe-task → prd-fe-task}/agents/openai.yaml +1 -1
- package/skills/{lark-fe-task → prd-fe-task}/scripts/config.sh +3 -3
- package/skills/{lark-fe-task → prd-fe-task}/scripts/list-configs.sh +3 -3
- package/skills/{lark-fe-task → prd-fe-task}/scripts/plan-lark-doc.sh +4 -4
- /package/skills/{lark-fe-task → prd-fe-task}/config/repos.json +0 -0
- /package/skills/{lark-fe-task → prd-fe-task}/references/task-breakdown-template.md +0 -0
package/README.md
CHANGED
|
@@ -1,30 +1,53 @@
|
|
|
1
1
|
# Lark FE Skills
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@renkosky/lark-fe-skills) [](./LICENSE) [](https://github.com/openai/codex) [](https://github.com/larksuite/cli/tree/main)
|
|
4
|
+
|
|
3
5
|
English | [中文](#中文)
|
|
4
6
|
|
|
7
|
+
Lark/Feishu based Codex skills for frontend requirement planning.
|
|
8
|
+
|
|
9
|
+
[Install](#install) · [Prerequisites](#prerequisites) · [CLI](#cli) · [Roadmap](#roadmap) · [中文](#中文)
|
|
10
|
+
|
|
5
11
|
## English
|
|
6
12
|
|
|
7
|
-
|
|
13
|
+
## ✨ What is this?
|
|
14
|
+
|
|
15
|
+
`@renkosky/lark-fe-skills` packages Codex skills for Lark-based frontend workflows.
|
|
8
16
|
|
|
9
|
-
The first
|
|
17
|
+
The first skill is `prd-fe-task`: read a Lark/Feishu requirement document, inspect configured frontend project paths, and generate a task breakdown Markdown file.
|
|
10
18
|
|
|
11
|
-
|
|
19
|
+
## 🚀 Install
|
|
20
|
+
|
|
21
|
+
1. Install the package:
|
|
12
22
|
|
|
13
23
|
```bash
|
|
14
24
|
npm install -g @renkosky/lark-fe-skills
|
|
15
|
-
lark-fe-skills install lark-fe-task
|
|
16
25
|
```
|
|
17
26
|
|
|
18
|
-
|
|
27
|
+
2. Install the skill:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
lark-fe-skills install prd-fe-task
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
3. Restart Codex or open a new Codex session.
|
|
34
|
+
|
|
35
|
+
PATH fallback:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm exec --package=@renkosky/lark-fe-skills -- lark-fe-skills install prd-fe-task
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Use it in Codex:
|
|
19
42
|
|
|
20
43
|
```text
|
|
21
|
-
[$
|
|
22
|
-
[$
|
|
44
|
+
[$prd-fe-task](~/.codex/skills/prd-fe-task/SKILL.md) +config
|
|
45
|
+
[$prd-fe-task](~/.codex/skills/prd-fe-task/SKILL.md) +plan <Lark document title, URL, or token>
|
|
23
46
|
```
|
|
24
47
|
|
|
25
|
-
|
|
48
|
+
## 🧰 Prerequisites
|
|
26
49
|
|
|
27
|
-
Install and configure `lark-cli`
|
|
50
|
+
Install and configure `lark-cli` first:
|
|
28
51
|
|
|
29
52
|
```bash
|
|
30
53
|
npm install -g @larksuite/cli
|
|
@@ -34,20 +57,32 @@ lark-cli auth login --recommend
|
|
|
34
57
|
|
|
35
58
|
Official lark-cli documentation: <https://github.com/larksuite/cli/tree/main>
|
|
36
59
|
|
|
37
|
-
|
|
60
|
+
## 🖥️ CLI
|
|
38
61
|
|
|
39
62
|
```bash
|
|
40
63
|
lark-fe-skills list
|
|
41
64
|
lark-fe-skills path
|
|
42
|
-
lark-fe-skills path
|
|
43
|
-
lark-fe-skills install
|
|
65
|
+
lark-fe-skills path prd-fe-task
|
|
66
|
+
lark-fe-skills install prd-fe-task
|
|
67
|
+
lark-fe-skills uninstall prd-fe-task
|
|
68
|
+
lark-fe-skills uninstall lark-fe-task
|
|
44
69
|
```
|
|
45
70
|
|
|
46
|
-
|
|
71
|
+
## 📦 Packaged Skills
|
|
72
|
+
|
|
73
|
+
| Skill | Description |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| `prd-fe-task` | Turn Lark/Feishu requirement documents into concrete frontend task breakdowns. |
|
|
47
76
|
|
|
48
|
-
|
|
77
|
+
## 📝 Notes
|
|
49
78
|
|
|
50
|
-
|
|
79
|
+
- npm installation and Codex skill installation are separate steps.
|
|
80
|
+
- This package installs skills to `~/.codex/skills`.
|
|
81
|
+
- Use `lark-fe-skills uninstall prd-fe-task` to reset local Codex skill installation for first-run testing.
|
|
82
|
+
- Use `lark-fe-skills uninstall lark-fe-task` to remove the legacy install directory.
|
|
83
|
+
- Existing Lark skills may live under `~/.agents/skills`; that is a different source.
|
|
84
|
+
|
|
85
|
+
## 🗺️ Roadmap
|
|
51
86
|
|
|
52
87
|
- [x] Phase 1: Generate frontend task breakdown Markdown from Lark requirement documents.
|
|
53
88
|
- [x] Configure repository root, frontend project paths, and output directory.
|
|
@@ -79,27 +114,46 @@ lark-fe-skills install lark-fe-task
|
|
|
79
114
|
|
|
80
115
|
## 中文
|
|
81
116
|
|
|
117
|
+
[安装](#安装) · [前置条件](#前置条件) · [CLI](#cli-1) · [开发规划](#开发规划) · [English](#english)
|
|
118
|
+
|
|
119
|
+
## ✨ 这是什么?
|
|
120
|
+
|
|
82
121
|
`@renkosky/lark-fe-skills` 用于分发基于 Lark/飞书的前端需求工作流 Codex skills。
|
|
83
122
|
|
|
84
|
-
|
|
123
|
+
首个 skill 是 `prd-fe-task`:读取 Lark/飞书需求文档,轻量检查已配置的前端项目路径,并生成前端任务拆分 Markdown。
|
|
124
|
+
|
|
125
|
+
## 🚀 安装
|
|
85
126
|
|
|
86
|
-
|
|
127
|
+
1. 安装 npm 包:
|
|
87
128
|
|
|
88
129
|
```bash
|
|
89
130
|
npm install -g @renkosky/lark-fe-skills
|
|
90
|
-
lark-fe-skills install lark-fe-task
|
|
91
131
|
```
|
|
92
132
|
|
|
93
|
-
|
|
133
|
+
2. 安装 skill:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
lark-fe-skills install prd-fe-task
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
3. 重启 Codex 或新开一个 Codex 会话。
|
|
140
|
+
|
|
141
|
+
PATH fallback:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npm exec --package=@renkosky/lark-fe-skills -- lark-fe-skills install prd-fe-task
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
在 Codex 中使用:
|
|
94
148
|
|
|
95
149
|
```text
|
|
96
|
-
[$
|
|
97
|
-
[$
|
|
150
|
+
[$prd-fe-task](~/.codex/skills/prd-fe-task/SKILL.md) +config
|
|
151
|
+
[$prd-fe-task](~/.codex/skills/prd-fe-task/SKILL.md) +plan <飞书文档标题、链接或 token>
|
|
98
152
|
```
|
|
99
153
|
|
|
100
|
-
|
|
154
|
+
## 🧰 前置条件
|
|
101
155
|
|
|
102
|
-
|
|
156
|
+
先安装并配置 `lark-cli`:
|
|
103
157
|
|
|
104
158
|
```bash
|
|
105
159
|
npm install -g @larksuite/cli
|
|
@@ -109,20 +163,32 @@ lark-cli auth login --recommend
|
|
|
109
163
|
|
|
110
164
|
官方 lark-cli 文档:<https://github.com/larksuite/cli/tree/main>
|
|
111
165
|
|
|
112
|
-
|
|
166
|
+
## 🖥️ CLI
|
|
113
167
|
|
|
114
168
|
```bash
|
|
115
169
|
lark-fe-skills list
|
|
116
170
|
lark-fe-skills path
|
|
117
|
-
lark-fe-skills path
|
|
118
|
-
lark-fe-skills install
|
|
171
|
+
lark-fe-skills path prd-fe-task
|
|
172
|
+
lark-fe-skills install prd-fe-task
|
|
173
|
+
lark-fe-skills uninstall prd-fe-task
|
|
174
|
+
lark-fe-skills uninstall lark-fe-task
|
|
119
175
|
```
|
|
120
176
|
|
|
121
|
-
|
|
177
|
+
## 📦 已包含 Skills
|
|
178
|
+
|
|
179
|
+
| Skill | 说明 |
|
|
180
|
+
| --- | --- |
|
|
181
|
+
| `prd-fe-task` | 将 Lark/飞书需求文档拆解成可开发的前端任务。 |
|
|
182
|
+
|
|
183
|
+
## 📝 说明
|
|
122
184
|
|
|
123
|
-
-
|
|
185
|
+
- npm 包安装和 Codex skill 安装是两步。
|
|
186
|
+
- 本包默认安装到 `~/.codex/skills`。
|
|
187
|
+
- 可以用 `lark-fe-skills uninstall prd-fe-task` 清理本地 Codex skill,方便测试首次安装流程。
|
|
188
|
+
- 可以用 `lark-fe-skills uninstall lark-fe-task` 清理旧版安装目录。
|
|
189
|
+
- 已有 Lark skills 可能位于 `~/.agents/skills`,这是另一类来源。
|
|
124
190
|
|
|
125
|
-
|
|
191
|
+
## 🗺️ 开发规划
|
|
126
192
|
|
|
127
193
|
- [x] Phase 1:根据 Lark 需求文档生成前端任务拆分 Markdown。
|
|
128
194
|
- [x] 配置仓库根目录、前端项目路径和输出目录。
|
package/bin/lark-fe-skills.js
CHANGED
|
@@ -8,7 +8,8 @@ import { homedir } from 'node:os'
|
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
9
9
|
const packageRoot = resolve(__dirname, '..')
|
|
10
10
|
const skillsRoot = join(packageRoot, 'skills')
|
|
11
|
-
const
|
|
11
|
+
const packagedSkills = ['prd-fe-task']
|
|
12
|
+
const uninstallableSkills = [...packagedSkills, 'lark-fe-task']
|
|
12
13
|
|
|
13
14
|
function usage() {
|
|
14
15
|
console.log(`lark-fe-skills
|
|
@@ -17,29 +18,33 @@ Usage:
|
|
|
17
18
|
lark-fe-skills list
|
|
18
19
|
lark-fe-skills path [skill-name]
|
|
19
20
|
lark-fe-skills install [skill-name]
|
|
21
|
+
lark-fe-skills uninstall [skill-name]
|
|
20
22
|
|
|
21
23
|
Commands:
|
|
22
24
|
list List packaged skills.
|
|
23
25
|
path Print the package skills directory or one skill path.
|
|
24
26
|
install Copy a packaged skill to $HOME/.codex/skills.
|
|
27
|
+
uninstall Remove an installed skill from $HOME/.codex/skills.
|
|
25
28
|
|
|
26
29
|
Examples:
|
|
27
30
|
lark-fe-skills list
|
|
28
|
-
lark-fe-skills path
|
|
29
|
-
lark-fe-skills install
|
|
31
|
+
lark-fe-skills path prd-fe-task
|
|
32
|
+
lark-fe-skills install prd-fe-task
|
|
33
|
+
lark-fe-skills uninstall prd-fe-task
|
|
34
|
+
lark-fe-skills uninstall lark-fe-task`)
|
|
30
35
|
}
|
|
31
36
|
|
|
32
|
-
function assertSkillName(skillName) {
|
|
33
|
-
if (!
|
|
37
|
+
function assertSkillName(skillName, validSkills = packagedSkills) {
|
|
38
|
+
if (!validSkills.includes(skillName)) {
|
|
34
39
|
console.error(`Unknown skill: ${skillName}`)
|
|
35
|
-
console.error(`Available skills: ${
|
|
40
|
+
console.error(`Available skills: ${validSkills.join(', ')}`)
|
|
36
41
|
process.exit(1)
|
|
37
42
|
}
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
function listSkills() {
|
|
41
46
|
console.log('Available skills:')
|
|
42
|
-
for (const skillName of
|
|
47
|
+
for (const skillName of packagedSkills) {
|
|
43
48
|
console.log(`- ${skillName}`)
|
|
44
49
|
}
|
|
45
50
|
}
|
|
@@ -53,7 +58,7 @@ function printPath(skillName) {
|
|
|
53
58
|
console.log(skillsRoot)
|
|
54
59
|
}
|
|
55
60
|
|
|
56
|
-
function installSkill(skillName = '
|
|
61
|
+
function installSkill(skillName = 'prd-fe-task') {
|
|
57
62
|
assertSkillName(skillName)
|
|
58
63
|
|
|
59
64
|
const source = join(skillsRoot, skillName)
|
|
@@ -74,6 +79,20 @@ function installSkill(skillName = 'lark-fe-task') {
|
|
|
74
79
|
console.log(`Installed ${skillName} to ${target}`)
|
|
75
80
|
}
|
|
76
81
|
|
|
82
|
+
function uninstallSkill(skillName = 'prd-fe-task') {
|
|
83
|
+
assertSkillName(skillName, uninstallableSkills)
|
|
84
|
+
|
|
85
|
+
const target = join(homedir(), '.codex', 'skills', skillName)
|
|
86
|
+
|
|
87
|
+
if (!existsSync(target)) {
|
|
88
|
+
console.log(`${skillName} is not installed at ${target}`)
|
|
89
|
+
return
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
rmSync(target, { recursive: true, force: true })
|
|
93
|
+
console.log(`Uninstalled ${skillName} from ${target}`)
|
|
94
|
+
}
|
|
95
|
+
|
|
77
96
|
const [command, skillName] = process.argv.slice(2)
|
|
78
97
|
|
|
79
98
|
switch (command) {
|
|
@@ -86,6 +105,9 @@ switch (command) {
|
|
|
86
105
|
case 'install':
|
|
87
106
|
installSkill(skillName)
|
|
88
107
|
break
|
|
108
|
+
case 'uninstall':
|
|
109
|
+
uninstallSkill(skillName)
|
|
110
|
+
break
|
|
89
111
|
case undefined:
|
|
90
112
|
case '-h':
|
|
91
113
|
case '--help':
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# PRD FE Task
|
|
2
2
|
|
|
3
3
|
English | [中文](#中文)
|
|
4
4
|
|
|
@@ -21,7 +21,7 @@ English | [中文](#中文)
|
|
|
21
21
|
|
|
22
22
|
### Overview
|
|
23
23
|
|
|
24
|
-
`
|
|
24
|
+
`prd-fe-task` is a Codex skill for turning Lark/Feishu requirement documents into concrete frontend task breakdowns.
|
|
25
25
|
|
|
26
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
27
|
|
|
@@ -42,11 +42,11 @@ Use this skill when you have a Lark/Feishu PRD, requirement document, or product
|
|
|
42
42
|
Example prompts:
|
|
43
43
|
|
|
44
44
|
```text
|
|
45
|
-
[$
|
|
45
|
+
[$prd-fe-task](path/to/SKILL.md) +plan <Lark document title>
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
```text
|
|
49
|
-
Use
|
|
49
|
+
Use prd-fe-task to split this Lark PRD into FE tasks: <Lark document URL>
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
### Prerequisites
|
|
@@ -80,13 +80,13 @@ Codex will:
|
|
|
80
80
|
Run the config workflow once per repository. In Codex, reference the skill and use `+config`:
|
|
81
81
|
|
|
82
82
|
```text
|
|
83
|
-
[$
|
|
83
|
+
[$prd-fe-task](path/to/SKILL.md) +config
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
You can also provide the values directly:
|
|
87
87
|
|
|
88
88
|
```text
|
|
89
|
-
[$
|
|
89
|
+
[$prd-fe-task](path/to/SKILL.md) +config <repo-root> <fe-project-paths> [output-dir]
|
|
90
90
|
```
|
|
91
91
|
|
|
92
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.
|
|
@@ -94,26 +94,26 @@ If the frontend paths are omitted, Codex should inspect the repository lightly,
|
|
|
94
94
|
The underlying helper command is:
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
"$HOME/.codex/skills/
|
|
97
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/config.sh" "<repo-root>" "<fe-project-paths>" "docs/frontend-tasks"
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
For a monorepo, pass comma-separated frontend project paths:
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
|
-
"$HOME/.codex/skills/
|
|
103
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/config.sh" "$(pwd)" "apps/web,apps/admin" "docs/frontend-tasks"
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
For a single frontend project repository, use `.`:
|
|
107
107
|
|
|
108
108
|
```bash
|
|
109
|
-
"$HOME/.codex/skills/
|
|
109
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/config.sh" "$(pwd)" "." "docs/frontend-tasks"
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
This writes:
|
|
113
113
|
|
|
114
114
|
```text
|
|
115
115
|
<repo-root>/.lark-fe-task/config.env
|
|
116
|
-
$HOME/.codex/skills/
|
|
116
|
+
$HOME/.codex/skills/prd-fe-task/config/repos.json
|
|
117
117
|
```
|
|
118
118
|
|
|
119
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.
|
|
@@ -131,13 +131,13 @@ Both store:
|
|
|
131
131
|
To show all configured repositories, use:
|
|
132
132
|
|
|
133
133
|
```text
|
|
134
|
-
[$
|
|
134
|
+
[$prd-fe-task](path/to/SKILL.md) +list
|
|
135
135
|
```
|
|
136
136
|
|
|
137
137
|
The underlying helper command is:
|
|
138
138
|
|
|
139
139
|
```bash
|
|
140
|
-
"$HOME/.codex/skills/
|
|
140
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/list-configs.sh"
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
This reads the global registry only. It does not scan your home directory.
|
|
@@ -147,13 +147,13 @@ This reads the global registry only. It does not scan your home directory.
|
|
|
147
147
|
To create a task plan from a Lark document, use:
|
|
148
148
|
|
|
149
149
|
```text
|
|
150
|
-
[$
|
|
150
|
+
[$prd-fe-task](path/to/SKILL.md) +plan <Lark document title, URL, or token>
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
The underlying helper command is:
|
|
154
154
|
|
|
155
155
|
```bash
|
|
156
|
-
"$HOME/.codex/skills/
|
|
156
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/plan-lark-doc.sh" "<document-title-or-url-or-token>" "<repo-root>"
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
The command fetches the Lark document and prints:
|
|
@@ -192,7 +192,7 @@ The generated Markdown includes:
|
|
|
192
192
|
### Files
|
|
193
193
|
|
|
194
194
|
```text
|
|
195
|
-
|
|
195
|
+
prd-fe-task/
|
|
196
196
|
├── SKILL.md
|
|
197
197
|
├── README.md
|
|
198
198
|
├── agents/
|
|
@@ -243,7 +243,7 @@ For the full `lark-fe-skills` project roadmap, see the root README.
|
|
|
243
243
|
|
|
244
244
|
### 概览
|
|
245
245
|
|
|
246
|
-
`
|
|
246
|
+
`prd-fe-task` 是一个 Codex skill,用于把 Lark/飞书需求文档拆解成可开发的前端任务。
|
|
247
247
|
|
|
248
248
|
它可以根据文档标题、链接或 token 读取 Lark 文档,提取需求内容,适度检查已配置的前端项目路径,然后在已配置的输出目录下生成 Markdown 任务拆分文档。
|
|
249
249
|
|
|
@@ -264,11 +264,11 @@ For the full `lark-fe-skills` project roadmap, see the root README.
|
|
|
264
264
|
示例:
|
|
265
265
|
|
|
266
266
|
```text
|
|
267
|
-
[$
|
|
267
|
+
[$prd-fe-task](path/to/SKILL.md) +plan <飞书文档标题>
|
|
268
268
|
```
|
|
269
269
|
|
|
270
270
|
```text
|
|
271
|
-
使用
|
|
271
|
+
使用 prd-fe-task 把这个飞书 PRD 拆成前端任务:<飞书文档链接>
|
|
272
272
|
```
|
|
273
273
|
|
|
274
274
|
### 前置条件
|
|
@@ -302,13 +302,13 @@ Codex 会:
|
|
|
302
302
|
每个仓库先运行一次配置流程。在 Codex 里引用 skill 并使用 `+config`:
|
|
303
303
|
|
|
304
304
|
```text
|
|
305
|
-
[$
|
|
305
|
+
[$prd-fe-task](path/to/SKILL.md) +config
|
|
306
306
|
```
|
|
307
307
|
|
|
308
308
|
也可以直接带上配置值:
|
|
309
309
|
|
|
310
310
|
```text
|
|
311
|
-
[$
|
|
311
|
+
[$prd-fe-task](path/to/SKILL.md) +config <repo-root> <fe-project-paths> [output-dir]
|
|
312
312
|
```
|
|
313
313
|
|
|
314
314
|
如果没有提供前端项目路径,Codex 应该轻量检查仓库,给出可能的前端项目路径,并在写入配置前让你确认。
|
|
@@ -316,26 +316,26 @@ Codex 会:
|
|
|
316
316
|
底层辅助命令是:
|
|
317
317
|
|
|
318
318
|
```bash
|
|
319
|
-
"$HOME/.codex/skills/
|
|
319
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/config.sh" "<repo-root>" "<fe-project-paths>" "docs/frontend-tasks"
|
|
320
320
|
```
|
|
321
321
|
|
|
322
322
|
monorepo 可以传多个前端项目路径,用英文逗号分隔:
|
|
323
323
|
|
|
324
324
|
```bash
|
|
325
|
-
"$HOME/.codex/skills/
|
|
325
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/config.sh" "$(pwd)" "apps/web,apps/admin" "docs/frontend-tasks"
|
|
326
326
|
```
|
|
327
327
|
|
|
328
328
|
如果仓库本身就是单个前端项目,可以使用 `.`:
|
|
329
329
|
|
|
330
330
|
```bash
|
|
331
|
-
"$HOME/.codex/skills/
|
|
331
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/config.sh" "$(pwd)" "." "docs/frontend-tasks"
|
|
332
332
|
```
|
|
333
333
|
|
|
334
334
|
它会写入:
|
|
335
335
|
|
|
336
336
|
```text
|
|
337
337
|
<repo-root>/.lark-fe-task/config.env
|
|
338
|
-
$HOME/.codex/skills/
|
|
338
|
+
$HOME/.codex/skills/prd-fe-task/config/repos.json
|
|
339
339
|
```
|
|
340
340
|
|
|
341
341
|
仓库内配置用于当前项目;全局 registry 用于查看已经配置过哪些仓库,也用于在 `+plan` 不在已配置仓库内执行时做兜底选择。
|
|
@@ -353,13 +353,13 @@ $HOME/.codex/skills/lark-fe-task/config/repos.json
|
|
|
353
353
|
查看所有已配置仓库:
|
|
354
354
|
|
|
355
355
|
```text
|
|
356
|
-
[$
|
|
356
|
+
[$prd-fe-task](path/to/SKILL.md) +list
|
|
357
357
|
```
|
|
358
358
|
|
|
359
359
|
底层辅助命令是:
|
|
360
360
|
|
|
361
361
|
```bash
|
|
362
|
-
"$HOME/.codex/skills/
|
|
362
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/list-configs.sh"
|
|
363
363
|
```
|
|
364
364
|
|
|
365
365
|
这个命令只读取全局 registry,不会扫描用户目录。
|
|
@@ -369,13 +369,13 @@ $HOME/.codex/skills/lark-fe-task/config/repos.json
|
|
|
369
369
|
根据 Lark 文档生成任务拆分:
|
|
370
370
|
|
|
371
371
|
```text
|
|
372
|
-
[$
|
|
372
|
+
[$prd-fe-task](path/to/SKILL.md) +plan <飞书文档标题、链接或 token>
|
|
373
373
|
```
|
|
374
374
|
|
|
375
375
|
底层辅助命令是:
|
|
376
376
|
|
|
377
377
|
```bash
|
|
378
|
-
"$HOME/.codex/skills/
|
|
378
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/plan-lark-doc.sh" "<文档标题或链接或token>" "<repo-root>"
|
|
379
379
|
```
|
|
380
380
|
|
|
381
381
|
这个命令会读取 Lark 文档,并输出:
|
|
@@ -414,7 +414,7 @@ $HOME/.codex/skills/lark-fe-task/config/repos.json
|
|
|
414
414
|
### 文件结构
|
|
415
415
|
|
|
416
416
|
```text
|
|
417
|
-
|
|
417
|
+
prd-fe-task/
|
|
418
418
|
├── SKILL.md
|
|
419
419
|
├── README.md
|
|
420
420
|
├── agents/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: prd-fe-task
|
|
3
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
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# PRD FE Task
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ Use this skill to produce a development-ready FE task breakdown from a Feishu/La
|
|
|
11
11
|
|
|
12
12
|
Default repo root: the current repository root, referred to below as `<repo-root>`
|
|
13
13
|
Default output directory: `docs/frontend-tasks`
|
|
14
|
-
Global repository registry: `$HOME/.codex/skills/
|
|
14
|
+
Global repository registry: `$HOME/.codex/skills/prd-fe-task/config/repos.json`
|
|
15
15
|
|
|
16
16
|
## Prerequisite
|
|
17
17
|
|
|
@@ -31,12 +31,12 @@ If `lark-cli` is missing, the helper scripts must stop and tell the user to inst
|
|
|
31
31
|
|
|
32
32
|
### +config
|
|
33
33
|
|
|
34
|
-
Use `+config` when the user wants to initialize or update the repository settings for this skill. Treat prompts such as `+config`, `配置
|
|
34
|
+
Use `+config` when the user wants to initialize or update the repository settings for this skill. Treat prompts such as `+config`, `配置 prd-fe-task`, or `设置前端项目路径` as requests to run the configuration workflow, not as requests to generate a task breakdown.
|
|
35
35
|
|
|
36
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
37
|
|
|
38
38
|
- `<repo-root>/.lark-fe-task/config.env`: repository-local config.
|
|
39
|
-
- `$HOME/.codex/skills/
|
|
39
|
+
- `$HOME/.codex/skills/prd-fe-task/config/repos.json`: global registry used for listing and fallback selection.
|
|
40
40
|
|
|
41
41
|
Because repository-local config contains machine-specific paths, `+config` must ensure `<repo-root>/.gitignore` contains `.lark-fe-task/`.
|
|
42
42
|
|
|
@@ -62,13 +62,13 @@ When the user provides incomplete arguments:
|
|
|
62
62
|
Recommended invocation:
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
"$HOME/.codex/skills/
|
|
65
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/config.sh" "<repo-root>" "<fe-project-paths>" "docs/frontend-tasks"
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
Example only:
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
"$HOME/.codex/skills/
|
|
71
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/config.sh" "$(pwd)" "apps/web,apps/admin" "docs/frontend-tasks"
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
If the user has not configured the repository, ask for or infer these values before producing a task breakdown.
|
|
@@ -80,7 +80,7 @@ Use `+list` when the user asks which repositories are configured, for example `
|
|
|
80
80
|
Recommended invocation:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
|
-
"$HOME/.codex/skills/
|
|
83
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/list-configs.sh"
|
|
84
84
|
```
|
|
85
85
|
|
|
86
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.
|
|
@@ -98,7 +98,7 @@ Accepted inputs:
|
|
|
98
98
|
Recommended invocation:
|
|
99
99
|
|
|
100
100
|
```bash
|
|
101
|
-
"$HOME/.codex/skills/
|
|
101
|
+
"$HOME/.codex/skills/prd-fe-task/scripts/plan-lark-doc.sh" "<document-title-or-url-or-token>" "<repo-root>"
|
|
102
102
|
```
|
|
103
103
|
|
|
104
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:
|
|
@@ -13,7 +13,7 @@ require_lark_cli() {
|
|
|
13
13
|
cat >&2 <<'EOF'
|
|
14
14
|
Error: lark-cli is required but was not found in PATH.
|
|
15
15
|
|
|
16
|
-
Please install and configure Lark CLI before using
|
|
16
|
+
Please install and configure Lark CLI before using prd-fe-task:
|
|
17
17
|
|
|
18
18
|
npm install -g @larksuite/cli
|
|
19
19
|
lark-cli config init
|
|
@@ -40,7 +40,7 @@ ensure_local_config_gitignore() {
|
|
|
40
40
|
if [[ -s "$gitignore_file" ]]; then
|
|
41
41
|
printf '\n'
|
|
42
42
|
fi
|
|
43
|
-
printf '#
|
|
43
|
+
printf '# prd-fe-task local config\n'
|
|
44
44
|
printf '%s\n' "$ignore_path"
|
|
45
45
|
} >> "$gitignore_file"
|
|
46
46
|
fi
|
|
@@ -110,7 +110,7 @@ ensure_local_config_gitignore "$REPO_ROOT"
|
|
|
110
110
|
' "$REGISTRY_FILE" "$REPO_ROOT" "$FE_PROJECT_PATHS" "$OUTPUT_DIR"
|
|
111
111
|
|
|
112
112
|
cat <<EOF
|
|
113
|
-
Configured
|
|
113
|
+
Configured prd-fe-task.
|
|
114
114
|
CONFIG_FILE=$CONFIG_FILE
|
|
115
115
|
REGISTRY_FILE=$REGISTRY_FILE
|
|
116
116
|
REPO_ROOT=$REPO_ROOT
|
|
@@ -6,7 +6,7 @@ REGISTRY_FILE="$SKILL_DIR/config/repos.json"
|
|
|
6
6
|
|
|
7
7
|
if [[ ! -f "$REGISTRY_FILE" || ! -s "$REGISTRY_FILE" ]]; then
|
|
8
8
|
cat <<'EOF'
|
|
9
|
-
No
|
|
9
|
+
No prd-fe-task repositories are configured yet.
|
|
10
10
|
|
|
11
11
|
Use:
|
|
12
12
|
+config <repo-root> <fe-project-paths> [output-dir]
|
|
@@ -20,14 +20,14 @@ fi
|
|
|
20
20
|
repos = data["repos"] || []
|
|
21
21
|
|
|
22
22
|
if repos.empty?
|
|
23
|
-
puts "No
|
|
23
|
+
puts "No prd-fe-task repositories are configured yet."
|
|
24
24
|
puts
|
|
25
25
|
puts "Use:"
|
|
26
26
|
puts " +config <repo-root> <fe-project-paths> [output-dir]"
|
|
27
27
|
exit 0
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
puts "Configured
|
|
30
|
+
puts "Configured prd-fe-task repositories:"
|
|
31
31
|
repos.each_with_index do |repo, index|
|
|
32
32
|
fe_paths = Array(repo["feProjectPaths"]).join(",")
|
|
33
33
|
puts
|
|
@@ -16,7 +16,7 @@ require_lark_cli() {
|
|
|
16
16
|
cat >&2 <<'EOF'
|
|
17
17
|
Error: lark-cli is required but was not found in PATH.
|
|
18
18
|
|
|
19
|
-
Please install and configure Lark CLI before using
|
|
19
|
+
Please install and configure Lark CLI before using prd-fe-task:
|
|
20
20
|
|
|
21
21
|
npm install -g @larksuite/cli
|
|
22
22
|
lark-cli config init
|
|
@@ -72,7 +72,7 @@ load_registry_config() {
|
|
|
72
72
|
puts "CONFIG_STATUS=registry"
|
|
73
73
|
puts "CONFIG_SOURCE=#{Shellwords.escape(ARGV[0])}"
|
|
74
74
|
else
|
|
75
|
-
warn "Multiple
|
|
75
|
+
warn "Multiple prd-fe-task repositories are configured. Choose one and rerun +plan with its repo root:"
|
|
76
76
|
repos.each_with_index do |repo, index|
|
|
77
77
|
warn "#{index + 1}. #{repo["repoRoot"]} | FE_PROJECT_PATHS=#{Array(repo["feProjectPaths"]).join(",")} | OUTPUT_DIR=#{repo["outputDir"]}"
|
|
78
78
|
end
|
|
@@ -136,7 +136,7 @@ slugify() {
|
|
|
136
136
|
puts slug
|
|
137
137
|
')"
|
|
138
138
|
if [[ -z "$slug" ]]; then
|
|
139
|
-
slug="
|
|
139
|
+
slug="prd-fe-task"
|
|
140
140
|
fi
|
|
141
141
|
printf '%s' "$slug"
|
|
142
142
|
}
|
|
@@ -164,7 +164,7 @@ ensure_output_gitignore() {
|
|
|
164
164
|
if [[ -s "$gitignore_file" ]]; then
|
|
165
165
|
printf '\n'
|
|
166
166
|
fi
|
|
167
|
-
printf '#
|
|
167
|
+
printf '# prd-fe-task generated task breakdowns\n'
|
|
168
168
|
printf '%s\n' "$ignore_path"
|
|
169
169
|
} >> "$gitignore_file"
|
|
170
170
|
fi
|
|
File without changes
|
|
File without changes
|