@wwkit/harness 1.0.31 → 1.0.33
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/LICENSE +21 -21
- package/README.md +128 -128
- package/agents/scrum.md +186 -180
- package/agents/sprint.md +121 -118
- package/bin/index.js +226 -226
- package/commands/fix.md +87 -87
- package/commands/git-sync.md +217 -217
- package/commands/net-port.md +364 -364
- package/commands/pytest.md +10 -10
- package/commands/resume.md +104 -104
- package/commands/tl.md +11 -11
- package/package.json +8 -7
- package/plugin.js +19 -19
- package/readme/development.md +39 -39
- package/readme/publish.md +41 -41
- package/readme/testing.md +44 -36
- package/scripts/postinstall.js +58 -58
- package/skills/better-skill/SKILL.md +124 -124
- package/skills/blame-skill/SKILL.md +201 -201
- package/skills/extract/SKILL.md +119 -119
- package/skills/extract/references/build-xpath.js +30 -30
- package/skills/extract/references/clean-html.js +90 -90
- package/skills/extract/references/detail.md +54 -54
- package/skills/extract/references/detail.schema.json5 +48 -48
- package/skills/extract/references/extract-detail.js +71 -71
- package/skills/extract/references/extract-regex.js +81 -81
- package/skills/extract/references/extract-sample.js +48 -48
- package/skills/extract/references/list-rule-gen.md +109 -109
- package/skills/extract/references/list.md +134 -134
- package/skills/extract/references/list.schema.json5 +33 -33
- package/skills/extract/references/navi.md +44 -44
- package/skills/extract/references/navi.schema.json5 +23 -23
- package/skills/extract/references/text.md +40 -40
- package/skills/extract/references/text.schema.json5 +21 -21
- package/skills/extract/references/to-text.js +20 -20
- package/skills/extract/references/validate-schema.js +39 -39
- package/skills/jstest/SKILL.md +561 -561
- package/skills/jstest/references/case-create.md +327 -327
- package/skills/jstest/references/case-fix.md +273 -273
- package/skills/jstest/references/config.md +148 -148
- package/skills/jstest/references/coverage-analyze.md +247 -247
- package/skills/jstest/references/env-ensure.md +210 -210
- package/skills/jstest/references/execute.md +168 -168
- package/skills/jstest/references/sample.md +166 -166
- package/skills/jstest/references/scoring-rules.md +75 -75
- package/skills/jstest/references/src/jstest-sample/Calculator.js +80 -80
- package/skills/jstest/references/src/jstest-sample/ConfigManager.js +72 -72
- package/skills/jstest/references/src/jstest-sample/FileProcessor.js +57 -57
- package/skills/jstest/references/src/jstest-sample/OrderService.js +98 -98
- package/skills/jstest/references/src/jstest-sample/TokenGenerator.js +60 -60
- package/skills/jstest/references/src/jstest-sample/UserService.js +56 -56
- package/skills/jstest/references/src/jstest-sample/index.js +6 -6
- package/skills/jstest/references/suitability-check.md +232 -232
- package/skills/jstest/references/test-standards.md +288 -288
- package/skills/lint/SKILL.md +440 -440
- package/skills/lint/references/ai-fix.md +137 -137
- package/skills/lint/references/config-setup.md +102 -102
- package/skills/lint/references/config.md +65 -65
- package/skills/lint/references/detect-language.js +65 -65
- package/skills/lint/references/env-ensure.md +88 -88
- package/skills/lint/references/language-detect.md +75 -75
- package/skills/lint/references/languages/js.md +110 -110
- package/skills/lint/references/languages/py.md +89 -89
- package/skills/lint/references/rules-analyze.md +125 -125
- package/skills/lint/references/suitability-check.md +81 -81
- package/skills/lint/references/tool-fix.md +90 -90
- package/skills/new-skill/SKILL.md +227 -227
- package/skills/new-skill/references/template.md +53 -53
- package/skills/new-skill/references/workflow-patterns.md +104 -104
- package/skills/pytest/SKILL.md +555 -555
- package/skills/pytest/references/case-create.md +324 -324
- package/skills/pytest/references/case-fix.md +271 -271
- package/skills/pytest/references/config.md +145 -145
- package/skills/pytest/references/coverage-analyze.md +223 -223
- package/skills/pytest/references/env-ensure.md +195 -195
- package/skills/pytest/references/execute.md +152 -152
- package/skills/pytest/references/sample.md +159 -159
- package/skills/pytest/references/scoring-rules.md +57 -57
- package/skills/pytest/references/src/pytest-sample/Calculator.py +67 -67
- package/skills/pytest/references/src/pytest-sample/ConfigManager.py +68 -68
- package/skills/pytest/references/src/pytest-sample/FileProcessor.py +53 -53
- package/skills/pytest/references/src/pytest-sample/OrderService.py +82 -82
- package/skills/pytest/references/src/pytest-sample/TokenGenerator.py +50 -50
- package/skills/pytest/references/src/pytest-sample/UserService.py +45 -45
- package/skills/pytest/references/suitability-check.md +220 -220
- package/skills/pytest/references/test-standards.md +244 -244
- package/skills/query/SKILL.md +71 -71
- package/skills/read-docs/SKILL.md +134 -134
- package/skills/read-docs/references/opencode/agents/cases.md +206 -206
- package/skills/read-docs/references/opencode/agents/design-pattern.md +47 -47
- package/skills/read-docs/references/opencode/agents/detail.md +191 -191
- package/skills/read-docs/references/opencode/agents/examples.md +100 -100
- package/skills/read-docs/references/opencode/agents/index.md +309 -309
- package/skills/read-docs/references/opencode/agents/parallel-dispatch.md +149 -149
- package/skills/read-docs/references/opencode/agents/subagent-internals.md +217 -217
- package/skills/read-docs/references/opencode/agents/workflow.md +161 -161
- package/skills/read-docs/references/opencode/cli/commands/acp.md +31 -31
- package/skills/read-docs/references/opencode/cli/commands/agent.md +16 -16
- package/skills/read-docs/references/opencode/cli/commands/attach.md +20 -20
- package/skills/read-docs/references/opencode/cli/commands/mcp.md +37 -37
- package/skills/read-docs/references/opencode/cli/commands/others.md +48 -48
- package/skills/read-docs/references/opencode/cli/commands/plugin.md +12 -12
- package/skills/read-docs/references/opencode/cli/commands/provider.md +43 -43
- package/skills/read-docs/references/opencode/cli/commands/run.md +81 -81
- package/skills/read-docs/references/opencode/cli/commands/serve.md +84 -84
- package/skills/read-docs/references/opencode/cli/commands/session.md +37 -37
- package/skills/read-docs/references/opencode/cli/commands/web.md +14 -14
- package/skills/read-docs/references/opencode/cli/env.md +38 -38
- package/skills/read-docs/references/opencode/cli/index.md +18 -18
- package/skills/read-docs/references/opencode/cli/tui.md +35 -35
- package/skills/read-docs/references/opencode/commands/examples.md +42 -42
- package/skills/read-docs/references/opencode/commands/index.md +185 -185
- package/skills/read-docs/references/opencode/config/provider.md +151 -151
- package/skills/read-docs/references/opencode/formatter/index.md +70 -70
- package/skills/read-docs/references/opencode/guide/config.md +419 -419
- package/skills/read-docs/references/opencode/guide/formatters.md +70 -70
- package/skills/read-docs/references/opencode/guide/index.md +37 -37
- package/skills/read-docs/references/opencode/guide/providers.md +31 -31
- package/skills/read-docs/references/opencode/guide/rules.md +63 -63
- package/skills/read-docs/references/opencode/plugins/examples.md +75 -75
- package/skills/read-docs/references/opencode/plugins/index.md +188 -188
- package/skills/read-docs/references/opencode/reference/index.md +118 -118
- package/skills/read-docs/references/opencode/rule/index.md +77 -77
- package/skills/read-docs/references/opencode/skills/detail.md +113 -113
- package/skills/read-docs/references/opencode/skills/examples.md +141 -141
- package/skills/read-docs/references/opencode/skills/index.md +126 -126
- package/skills/read-docs/references/opencode/skills/workflow.md +146 -146
- package/skills/read-docs/references/opencode/tests/agent.md +9 -9
- package/skills/read-docs/references/opencode/tests/config.md +59 -59
- package/skills/read-docs/references/opencode/tests/file.md +11 -11
- package/skills/read-docs/references/opencode/tests/serve.md +17 -17
- package/skills/read-docs/references/opencode/tests/session.md +30 -30
- package/skills/read-docs/references/opencode/tests/web.md +16 -16
- package/skills/read-docs/references/opencode/tools/arguments.md +305 -305
- package/skills/read-docs/references/opencode/tools/context.md +17 -17
- package/skills/read-docs/references/opencode/tools/custom.md +110 -110
- package/skills/read-docs/references/opencode/tools/detail.md +104 -104
- package/skills/read-docs/references/opencode/tools/examples.md +71 -71
- package/skills/read-docs/references/opencode/tools/index.md +56 -56
- package/skills/read-docs/references/opencode/tools/lsp.md +25 -25
- package/skills/read-docs/references/opencode/tools/mcp.md +132 -132
- package/skills/read-docs/references/opencode/train/README.md +134 -134
- package/skills/read-docs/references/opencode/train/agent-basic.md +771 -771
- package/skills/read-docs/references/opencode/train/command-basic.md +667 -667
- package/skills/read-docs/references/opencode/train/config-basic.md +508 -508
- package/skills/read-docs/references/opencode/train/index.md +163 -163
- package/skills/read-docs/references/opencode/train/practice.md +872 -872
- package/skills/read-docs/references/opencode/train/skill-basic.md +607 -607
- package/skills/read-docs/references/opencode/tui/commands/config.md +31 -31
- package/skills/read-docs/references/opencode/tui/commands/editor.md +46 -46
- package/skills/read-docs/references/opencode/tui/commands/index.md +124 -124
- package/skills/read-docs/references/opencode/tui/commands/init.md +4 -4
- package/skills/read-docs/references/opencode/tui/index.md +26 -26
- package/skills/read-docs/references/superpowers/bootstrap.md +107 -107
- package/skills/read-docs/references/superpowers/comparison.md +77 -77
- package/skills/read-docs/references/superpowers/context.md +71 -71
- package/skills/read-docs/references/superpowers/index.md +58 -58
- package/skills/read-docs/references/superpowers/parallel.md +49 -49
- package/skills/read-docs/references/superpowers/sdd.md +183 -183
- package/skills/read-docs/references/superpowers/skills.md +68 -68
- package/skills/read-docs/references/superpowers/workflow.md +83 -83
- package/skills/revise/SKILL.md +121 -121
- package/skills/revise/references/article.md +36 -36
- package/skills/revise/references/article.schema.json5 +40 -40
- package/skills/revise/references/gallery.md +34 -34
- package/skills/revise/references/gallery.schema.json5 +40 -40
- package/skills/revise/references/question.md +32 -32
- package/skills/revise/references/question.schema.json5 +31 -31
- package/skills/revise/references/status.md +31 -31
- package/skills/revise/references/status.schema.json5 +27 -27
- package/skills/revise/references/validate-schema.js +39 -39
- package/src/config.js +29 -29
- package/src/config.json5 +19 -19
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
# 主工作流
|
|
2
|
-
|
|
3
|
-
## 完整流程
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
brainstorming → writing-plans → using-git-worktrees →
|
|
7
|
-
subagent-driven-development (or executing-plans) →
|
|
8
|
-
requesting-code-review → finishing-a-development-branch
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Brainstorming 阶段
|
|
12
|
-
|
|
13
|
-
**触发**:用户说"构建 X" 或 "实现功能 Y"
|
|
14
|
-
|
|
15
|
-
**流程**:
|
|
16
|
-
1. 探索项目上下文(文件、文档、最近提交)
|
|
17
|
-
2. 逐个提问澄清需求(一次一个问题)
|
|
18
|
-
3. 提出 2-3 种方案 + 权衡 + 推荐
|
|
19
|
-
4. 分段展示设计,每段后获用户确认
|
|
20
|
-
5. 写设计文档到 `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
|
|
21
|
-
6. 自审 spec(占位符扫描、一致性、范围、歧义)
|
|
22
|
-
7. 用户审查 spec
|
|
23
|
-
8. 调用 `writing-plans` 技能
|
|
24
|
-
|
|
25
|
-
**硬门控**:在设计获批前,禁止写任何代码。
|
|
26
|
-
|
|
27
|
-
## Writing Plans 阶段
|
|
28
|
-
|
|
29
|
-
**输入**:已批准的 spec
|
|
30
|
-
|
|
31
|
-
**产出**:实现计划文件 `docs/superpowers/plans/YYYY-MM-DD-<feature>.md`
|
|
32
|
-
|
|
33
|
-
**计划格式**:
|
|
34
|
-
```markdown
|
|
35
|
-
# [Feature] Implementation Plan
|
|
36
|
-
|
|
37
|
-
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development
|
|
38
|
-
|
|
39
|
-
**Goal:** [一句话]
|
|
40
|
-
**Architecture:** [2-3 句]
|
|
41
|
-
**Tech Stack:** [技术栈]
|
|
42
|
-
|
|
43
|
-
## Global Constraints
|
|
44
|
-
[项目级约束 — 版本、命名、平台要求等]
|
|
45
|
-
|
|
46
|
-
### Task N: [Component Name]
|
|
47
|
-
**Files:** Create/Modify/Test 路径
|
|
48
|
-
**Interfaces:** Consumes/Produces
|
|
49
|
-
- [ ] Step 1: Write the failing test
|
|
50
|
-
- [ ] Step 2: Run test to verify it fails
|
|
51
|
-
- [ ] Step 3: Write minimal implementation
|
|
52
|
-
- [ ] Step 4: Run test to verify it passes
|
|
53
|
-
- [ ] Step 5: Commit
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**关键原则**:
|
|
57
|
-
- 每步 2-5 分钟
|
|
58
|
-
- 无占位符("TBD"、"add error handling" 等是计划失败)
|
|
59
|
-
- 每步包含完整代码
|
|
60
|
-
- TDD:先写失败测试,再实现
|
|
61
|
-
|
|
62
|
-
## 执行选择
|
|
63
|
-
|
|
64
|
-
计划完成后,提供两种执行方式:
|
|
65
|
-
|
|
66
|
-
| 方式 | 条件 | 特点 |
|
|
67
|
-
|------|------|------|
|
|
68
|
-
| Subagent-Driven Development(推荐) | 有 subagent 能力 | 每任务一个 fresh subagent + 两阶段 review |
|
|
69
|
-
| Executing Plans(inline) | 无 subagent | 批量执行 + 人工检查点 |
|
|
70
|
-
|
|
71
|
-
## Finishing 阶段
|
|
72
|
-
|
|
73
|
-
1. 运行全量测试
|
|
74
|
-
2. 检测环境(normal repo / worktree / detached HEAD)
|
|
75
|
-
3. 确认 base branch
|
|
76
|
-
4. 呈现选项:
|
|
77
|
-
- Merge back to base locally
|
|
78
|
-
- Push and create PR
|
|
79
|
-
- Keep as-is
|
|
80
|
-
5. 执行用户选择
|
|
81
|
-
6. 清理工作区(仅 Superpowers 创建的 worktree)
|
|
82
|
-
|
|
83
|
-
**关键**:集成决策是用户的,agent 只呈现菜单等待回答。
|
|
1
|
+
# 主工作流
|
|
2
|
+
|
|
3
|
+
## 完整流程
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
brainstorming → writing-plans → using-git-worktrees →
|
|
7
|
+
subagent-driven-development (or executing-plans) →
|
|
8
|
+
requesting-code-review → finishing-a-development-branch
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Brainstorming 阶段
|
|
12
|
+
|
|
13
|
+
**触发**:用户说"构建 X" 或 "实现功能 Y"
|
|
14
|
+
|
|
15
|
+
**流程**:
|
|
16
|
+
1. 探索项目上下文(文件、文档、最近提交)
|
|
17
|
+
2. 逐个提问澄清需求(一次一个问题)
|
|
18
|
+
3. 提出 2-3 种方案 + 权衡 + 推荐
|
|
19
|
+
4. 分段展示设计,每段后获用户确认
|
|
20
|
+
5. 写设计文档到 `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
|
|
21
|
+
6. 自审 spec(占位符扫描、一致性、范围、歧义)
|
|
22
|
+
7. 用户审查 spec
|
|
23
|
+
8. 调用 `writing-plans` 技能
|
|
24
|
+
|
|
25
|
+
**硬门控**:在设计获批前,禁止写任何代码。
|
|
26
|
+
|
|
27
|
+
## Writing Plans 阶段
|
|
28
|
+
|
|
29
|
+
**输入**:已批准的 spec
|
|
30
|
+
|
|
31
|
+
**产出**:实现计划文件 `docs/superpowers/plans/YYYY-MM-DD-<feature>.md`
|
|
32
|
+
|
|
33
|
+
**计划格式**:
|
|
34
|
+
```markdown
|
|
35
|
+
# [Feature] Implementation Plan
|
|
36
|
+
|
|
37
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development
|
|
38
|
+
|
|
39
|
+
**Goal:** [一句话]
|
|
40
|
+
**Architecture:** [2-3 句]
|
|
41
|
+
**Tech Stack:** [技术栈]
|
|
42
|
+
|
|
43
|
+
## Global Constraints
|
|
44
|
+
[项目级约束 — 版本、命名、平台要求等]
|
|
45
|
+
|
|
46
|
+
### Task N: [Component Name]
|
|
47
|
+
**Files:** Create/Modify/Test 路径
|
|
48
|
+
**Interfaces:** Consumes/Produces
|
|
49
|
+
- [ ] Step 1: Write the failing test
|
|
50
|
+
- [ ] Step 2: Run test to verify it fails
|
|
51
|
+
- [ ] Step 3: Write minimal implementation
|
|
52
|
+
- [ ] Step 4: Run test to verify it passes
|
|
53
|
+
- [ ] Step 5: Commit
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**关键原则**:
|
|
57
|
+
- 每步 2-5 分钟
|
|
58
|
+
- 无占位符("TBD"、"add error handling" 等是计划失败)
|
|
59
|
+
- 每步包含完整代码
|
|
60
|
+
- TDD:先写失败测试,再实现
|
|
61
|
+
|
|
62
|
+
## 执行选择
|
|
63
|
+
|
|
64
|
+
计划完成后,提供两种执行方式:
|
|
65
|
+
|
|
66
|
+
| 方式 | 条件 | 特点 |
|
|
67
|
+
|------|------|------|
|
|
68
|
+
| Subagent-Driven Development(推荐) | 有 subagent 能力 | 每任务一个 fresh subagent + 两阶段 review |
|
|
69
|
+
| Executing Plans(inline) | 无 subagent | 批量执行 + 人工检查点 |
|
|
70
|
+
|
|
71
|
+
## Finishing 阶段
|
|
72
|
+
|
|
73
|
+
1. 运行全量测试
|
|
74
|
+
2. 检测环境(normal repo / worktree / detached HEAD)
|
|
75
|
+
3. 确认 base branch
|
|
76
|
+
4. 呈现选项:
|
|
77
|
+
- Merge back to base locally
|
|
78
|
+
- Push and create PR
|
|
79
|
+
- Keep as-is
|
|
80
|
+
5. 执行用户选择
|
|
81
|
+
6. 清理工作区(仅 Superpowers 创建的 worktree)
|
|
82
|
+
|
|
83
|
+
**关键**:集成决策是用户的,agent 只呈现菜单等待回答。
|
package/skills/revise/SKILL.md
CHANGED
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: revise
|
|
3
|
-
description: |
|
|
4
|
-
自包含内容创作 skill(固定 Sprint 范式):每次调用 = 一个固定 Sprint(Planning→Execution→Review),todowrite 落 3 项带 DoD 的 Sprint Backlog 并逐项验证,产出通过 schema 校验的 JSON 数组。
|
|
5
|
-
format=question/status/gallery/article(支持中文别名指定),count 控制条目数(默认1),language 控制输出语言(默认中文)。调用方直接传原始任务消息即可,无需预处理;禁止 WebFetch/网络请求。
|
|
6
|
-
license: MIT
|
|
7
|
-
metadata:
|
|
8
|
-
workflow: sequential
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# revise 技能(固定 Sprint 冲刺)
|
|
12
|
-
|
|
13
|
-
## 执行范式
|
|
14
|
-
|
|
15
|
-
每次调用 = 一个固定 Sprint,三个事件:
|
|
16
|
-
|
|
17
|
-
1. **Sprint Planning**:解析入参 → 定义 Sprint Goal → todowrite 落固定 3 项 Sprint Backlog(每项带 DoD)
|
|
18
|
-
2. **Sprint Execution**:逐项执行,每项 = 执行 → 验证 DoD → todowrite 勾单 Done
|
|
19
|
-
3. **Sprint Review**:对照 Sprint Goal 验证 Increment(JSON 数组)及输出语义
|
|
20
|
-
|
|
21
|
-
**Sprint Goal** = `产出 {{count}} 条符合 {{format}} 格式、{{language}} 语言的 JSON 数组,并通过 schema 校验`。
|
|
22
|
-
|
|
23
|
-
## 输入参数
|
|
24
|
-
|
|
25
|
-
入参为调用方传入的**原始任务消息**,可为 JSON 对象、key=value 或自然语言等任意形态,agent 依据字段语义自主提取。字段清单(字段/类型/必填/默认值):
|
|
26
|
-
|
|
27
|
-
| 字段 | 类型 | 必填 | 说明 |
|
|
28
|
-
|---|---|---|---|
|
|
29
|
-
| `format` | string | ✅ | 创作格式,标准值 `question`/`status`/`gallery`/`article`,可用自然语言别名指定(见别名对照) |
|
|
30
|
-
| `source` | string | ✅ | 原始素材:文本 / JSON 字符串 / 文件路径 |
|
|
31
|
-
| `count` | integer | ❌ | 生成 item 数量,默认 1(非整数或 <1 按 1) |
|
|
32
|
-
| `language` | string | ❌ | 输出语言,默认 中文(空白按中文) |
|
|
33
|
-
| `style` | string | ❌ | 创作风格描述(自由文本),缺省用 format 默认风格(`<format>.md` 的 Style 模块) |
|
|
34
|
-
| `output` | string | ❌ | 输出文件路径(提供则写文件,否则 stdout) |
|
|
35
|
-
|
|
36
|
-
本技能仅使用上表六个字段,忽略所有其他字段(如 `url`)。
|
|
37
|
-
|
|
38
|
-
**format 别名对照**:
|
|
39
|
-
|
|
40
|
-
| format 标准值 | 别名 terms |
|
|
41
|
-
|---|---|
|
|
42
|
-
| `question` | 问题 / 提问 / 互动话题 / 话题 / question |
|
|
43
|
-
| `status` | 动态 / 微博 / 朋友圈 / 状态 / 一句话 / status |
|
|
44
|
-
| `gallery` | 图集 / 相册 / 多图 / 图片合集 / gallery |
|
|
45
|
-
| `article` | 文章 / 图文 / 长文 / 推文 / article |
|
|
46
|
-
|
|
47
|
-
## 固定 Sprint Backlog(todowrite 落单,覆盖历史 todos)
|
|
48
|
-
|
|
49
|
-
1. 解析入参 + 准备素材 + 加载 references | DoD: 六字段已提取、素材已就绪(文件已读)、prompt 与 schema 已读且 schema 绝对路径已记录(或 stderr 报错结束)
|
|
50
|
-
2. 内容生成 + Schema 校验(失败修复重试 ≤3 次) | DoD: 产出含 `{{count}}` 个 item、`{{language}}` 语言的裸 JSON 数组且 `node validate-schema.js` 校验通过(或重试耗尽 stderr 报错)
|
|
51
|
-
3. 输出 | DoD: 按输出语义交付 JSON 数组(文件路径或 stdout)
|
|
52
|
-
|
|
53
|
-
## Sprint Execution
|
|
54
|
-
|
|
55
|
-
按固定 3 项逐项执行(勾单机制见执行范式)。
|
|
56
|
-
|
|
57
|
-
### Item 1:解析入参 + 准备素材 + 加载 references
|
|
58
|
-
|
|
59
|
-
从原始任务消息中自主提取 `format`/`source`/`count`/`language`/`style`/`output` 六个字段;自然语言格式按「format 别名对照」翻译。`source` 为文件路径时用 `read` 读取其内容作为素材。
|
|
60
|
-
|
|
61
|
-
**短路规则(命中即结束,禁止继续执行):**
|
|
62
|
-
|
|
63
|
-
1. `source` 为空、null 或仅含空白 → 将错误信息输出到 stderr 并结束
|
|
64
|
-
2. `format` 未提供或经别名对照翻译后仍为空 → 将错误信息输出到 stderr 并结束
|
|
65
|
-
|
|
66
|
-
未短路时**并行读取** `references/{{format}}.md`(LLM 创作指令)与 `references/{{format}}.schema.json5`(输出校验规则),记录 schema 绝对路径(Item 2 校验用);references 文件不存在 → 将错误信息输出到 stderr 并结束。
|
|
67
|
-
|
|
68
|
-
### Item 2:内容生成 + Schema 校验
|
|
69
|
-
|
|
70
|
-
将素材结合 Prompt 文件内容调用 LLM 生成:**必须生成 `{{count}}` 个 item,整体输出为 JSON 数组(即使 count=1)**,内容语言使用 `{{language}}`(缺省按参数表默认值)。生成时向 LLM 传入:原始素材、Prompt 文件内容、`{{count}}`、`{{language}}`、输出格式说明和示例。
|
|
71
|
-
|
|
72
|
-
**style 覆盖**:若提供 `style`,以 `{{style}}` 取代 `<format>.md` 的 **Style 模块**(默认创作风格);**Format 模块(输出契约)不可变**——结构、schema 字段、长度、图片数量上限、真实性约束均以 Format 模块与 schema 为准。
|
|
73
|
-
|
|
74
|
-
**裸 JSON 硬约束**:输出必须为裸 JSON 数组——不使用 markdown 代码围栏(```json)、不输出任何解释、思考过程或额外文本、无尾注,直接以 `[` 开始、`]` 结束。
|
|
75
|
-
|
|
76
|
-
用 `write` 将 `{"data": <JSON 数组>, "schema_path": "<schema 绝对路径>"}` 写入**单个**临时 JSON 输入文件(数组内嵌于 `data`,无需单独写待校验数组文件),stdin 重定向交给 Node.js 校验:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
node '<技能目录>/references/validate-schema.js' < <临时 JSON 输入文件>
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
- 通过 → 进入 Item 3
|
|
83
|
-
- 失败 → 将 Schema 校验错误反馈给 LLM(原始素材 + Prompt 文件内容 + 上一轮不合格内容 + 错误详情)重新生成后再次校验,**最多重试 3 次**;耗尽 → 将最后一次错误及「重试 3 次后 schema 校验仍然失败」输出到 stderr 并结束
|
|
84
|
-
|
|
85
|
-
### Item 3:输出
|
|
86
|
-
|
|
87
|
-
本项执行时校验必已通过:
|
|
88
|
-
|
|
89
|
-
- 提供 `output` → 用 `write` 将最终 JSON 数组写入该文件(**禁止创建其他文件**),stdout 输出文件路径
|
|
90
|
-
- 未提供 `output` → 将最终 JSON 数组直接输出到 stdout,**不写任何文件**
|
|
91
|
-
|
|
92
|
-
## Sprint Review
|
|
93
|
-
|
|
94
|
-
本 skill 每次调用 = 无状态独立 Sprint,无跨轮次状态,故不进行 Retrospective。所有 Backlog Items 完成后:
|
|
95
|
-
|
|
96
|
-
- **对照 Sprint Goal 验证**:产出的是否为 `{{count}}` 条符合 `{{format}}` 格式、`{{language}}` 语言的 JSON 数组且通过 schema 校验?输出语义是否正确(写文件输出路径 / stdout 输出数组)?
|
|
97
|
-
- **展示 Increment**:输出文件路径或 stdout 的 JSON 数组。
|
|
98
|
-
|
|
99
|
-
## 约束
|
|
100
|
-
|
|
101
|
-
- 只处理已声明字段(source/format/count/language/output),忽略所有其他传入参数(如 `url`),**禁止**以任何形式使用它们。
|
|
102
|
-
- **禁止使用 WebFetch 或任何网络请求、禁止访问外部网络**;`source`/`format` 不合法时向 stderr 输出错误信息,绝不自行获取内容。
|
|
103
|
-
- 写文件一律用 `write` 工具;读文件用 `read` 工具;中间数据写入临时文件,以 stdin 重定向传给 node。
|
|
104
|
-
- 禁止使用未授权的 `cp`/`rm`/`mv` 等命令;需要复制、移动或删除临时文件时用 `node -e` 的 fs 模块完成。
|
|
105
|
-
- 中间产物完成后清理,禁止写入 output 以外的任何持久文件。
|
|
106
|
-
|
|
107
|
-
## references/ 目录结构
|
|
108
|
-
|
|
109
|
-
每个 format 需要两个文件,schema 定义为**数组**(`minItems: 1`),`items` 描述单个 item 的结构:
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
references/
|
|
113
|
-
├── question.md # 社交媒体问题 prompt
|
|
114
|
-
├── question.schema.json5 # 输出 JSON Schema
|
|
115
|
-
├── status.md # 社交媒体动态 prompt
|
|
116
|
-
├── status.schema.json5
|
|
117
|
-
├── gallery.md # 社交媒体图集 prompt
|
|
118
|
-
├── gallery.schema.json5
|
|
119
|
-
├── article.md # 社交媒体图文文章 prompt
|
|
120
|
-
├── article.schema.json5
|
|
121
|
-
└── validate-schema.js # schema 校验脚本(stdin 输入)
|
|
1
|
+
---
|
|
2
|
+
name: revise
|
|
3
|
+
description: |
|
|
4
|
+
自包含内容创作 skill(固定 Sprint 范式):每次调用 = 一个固定 Sprint(Planning→Execution→Review),todowrite 落 3 项带 DoD 的 Sprint Backlog 并逐项验证,产出通过 schema 校验的 JSON 数组。
|
|
5
|
+
format=question/status/gallery/article(支持中文别名指定),count 控制条目数(默认1),language 控制输出语言(默认中文)。调用方直接传原始任务消息即可,无需预处理;禁止 WebFetch/网络请求。
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
workflow: sequential
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# revise 技能(固定 Sprint 冲刺)
|
|
12
|
+
|
|
13
|
+
## 执行范式
|
|
14
|
+
|
|
15
|
+
每次调用 = 一个固定 Sprint,三个事件:
|
|
16
|
+
|
|
17
|
+
1. **Sprint Planning**:解析入参 → 定义 Sprint Goal → todowrite 落固定 3 项 Sprint Backlog(每项带 DoD)
|
|
18
|
+
2. **Sprint Execution**:逐项执行,每项 = 执行 → 验证 DoD → todowrite 勾单 Done
|
|
19
|
+
3. **Sprint Review**:对照 Sprint Goal 验证 Increment(JSON 数组)及输出语义
|
|
20
|
+
|
|
21
|
+
**Sprint Goal** = `产出 {{count}} 条符合 {{format}} 格式、{{language}} 语言的 JSON 数组,并通过 schema 校验`。
|
|
22
|
+
|
|
23
|
+
## 输入参数
|
|
24
|
+
|
|
25
|
+
入参为调用方传入的**原始任务消息**,可为 JSON 对象、key=value 或自然语言等任意形态,agent 依据字段语义自主提取。字段清单(字段/类型/必填/默认值):
|
|
26
|
+
|
|
27
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
| `format` | string | ✅ | 创作格式,标准值 `question`/`status`/`gallery`/`article`,可用自然语言别名指定(见别名对照) |
|
|
30
|
+
| `source` | string | ✅ | 原始素材:文本 / JSON 字符串 / 文件路径 |
|
|
31
|
+
| `count` | integer | ❌ | 生成 item 数量,默认 1(非整数或 <1 按 1) |
|
|
32
|
+
| `language` | string | ❌ | 输出语言,默认 中文(空白按中文) |
|
|
33
|
+
| `style` | string | ❌ | 创作风格描述(自由文本),缺省用 format 默认风格(`<format>.md` 的 Style 模块) |
|
|
34
|
+
| `output` | string | ❌ | 输出文件路径(提供则写文件,否则 stdout) |
|
|
35
|
+
|
|
36
|
+
本技能仅使用上表六个字段,忽略所有其他字段(如 `url`)。
|
|
37
|
+
|
|
38
|
+
**format 别名对照**:
|
|
39
|
+
|
|
40
|
+
| format 标准值 | 别名 terms |
|
|
41
|
+
|---|---|
|
|
42
|
+
| `question` | 问题 / 提问 / 互动话题 / 话题 / question |
|
|
43
|
+
| `status` | 动态 / 微博 / 朋友圈 / 状态 / 一句话 / status |
|
|
44
|
+
| `gallery` | 图集 / 相册 / 多图 / 图片合集 / gallery |
|
|
45
|
+
| `article` | 文章 / 图文 / 长文 / 推文 / article |
|
|
46
|
+
|
|
47
|
+
## 固定 Sprint Backlog(todowrite 落单,覆盖历史 todos)
|
|
48
|
+
|
|
49
|
+
1. 解析入参 + 准备素材 + 加载 references | DoD: 六字段已提取、素材已就绪(文件已读)、prompt 与 schema 已读且 schema 绝对路径已记录(或 stderr 报错结束)
|
|
50
|
+
2. 内容生成 + Schema 校验(失败修复重试 ≤3 次) | DoD: 产出含 `{{count}}` 个 item、`{{language}}` 语言的裸 JSON 数组且 `node validate-schema.js` 校验通过(或重试耗尽 stderr 报错)
|
|
51
|
+
3. 输出 | DoD: 按输出语义交付 JSON 数组(文件路径或 stdout)
|
|
52
|
+
|
|
53
|
+
## Sprint Execution
|
|
54
|
+
|
|
55
|
+
按固定 3 项逐项执行(勾单机制见执行范式)。
|
|
56
|
+
|
|
57
|
+
### Item 1:解析入参 + 准备素材 + 加载 references
|
|
58
|
+
|
|
59
|
+
从原始任务消息中自主提取 `format`/`source`/`count`/`language`/`style`/`output` 六个字段;自然语言格式按「format 别名对照」翻译。`source` 为文件路径时用 `read` 读取其内容作为素材。
|
|
60
|
+
|
|
61
|
+
**短路规则(命中即结束,禁止继续执行):**
|
|
62
|
+
|
|
63
|
+
1. `source` 为空、null 或仅含空白 → 将错误信息输出到 stderr 并结束
|
|
64
|
+
2. `format` 未提供或经别名对照翻译后仍为空 → 将错误信息输出到 stderr 并结束
|
|
65
|
+
|
|
66
|
+
未短路时**并行读取** `references/{{format}}.md`(LLM 创作指令)与 `references/{{format}}.schema.json5`(输出校验规则),记录 schema 绝对路径(Item 2 校验用);references 文件不存在 → 将错误信息输出到 stderr 并结束。
|
|
67
|
+
|
|
68
|
+
### Item 2:内容生成 + Schema 校验
|
|
69
|
+
|
|
70
|
+
将素材结合 Prompt 文件内容调用 LLM 生成:**必须生成 `{{count}}` 个 item,整体输出为 JSON 数组(即使 count=1)**,内容语言使用 `{{language}}`(缺省按参数表默认值)。生成时向 LLM 传入:原始素材、Prompt 文件内容、`{{count}}`、`{{language}}`、输出格式说明和示例。
|
|
71
|
+
|
|
72
|
+
**style 覆盖**:若提供 `style`,以 `{{style}}` 取代 `<format>.md` 的 **Style 模块**(默认创作风格);**Format 模块(输出契约)不可变**——结构、schema 字段、长度、图片数量上限、真实性约束均以 Format 模块与 schema 为准。
|
|
73
|
+
|
|
74
|
+
**裸 JSON 硬约束**:输出必须为裸 JSON 数组——不使用 markdown 代码围栏(```json)、不输出任何解释、思考过程或额外文本、无尾注,直接以 `[` 开始、`]` 结束。
|
|
75
|
+
|
|
76
|
+
用 `write` 将 `{"data": <JSON 数组>, "schema_path": "<schema 绝对路径>"}` 写入**单个**临时 JSON 输入文件(数组内嵌于 `data`,无需单独写待校验数组文件),stdin 重定向交给 Node.js 校验:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
node '<技能目录>/references/validate-schema.js' < <临时 JSON 输入文件>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
- 通过 → 进入 Item 3
|
|
83
|
+
- 失败 → 将 Schema 校验错误反馈给 LLM(原始素材 + Prompt 文件内容 + 上一轮不合格内容 + 错误详情)重新生成后再次校验,**最多重试 3 次**;耗尽 → 将最后一次错误及「重试 3 次后 schema 校验仍然失败」输出到 stderr 并结束
|
|
84
|
+
|
|
85
|
+
### Item 3:输出
|
|
86
|
+
|
|
87
|
+
本项执行时校验必已通过:
|
|
88
|
+
|
|
89
|
+
- 提供 `output` → 用 `write` 将最终 JSON 数组写入该文件(**禁止创建其他文件**),stdout 输出文件路径
|
|
90
|
+
- 未提供 `output` → 将最终 JSON 数组直接输出到 stdout,**不写任何文件**
|
|
91
|
+
|
|
92
|
+
## Sprint Review
|
|
93
|
+
|
|
94
|
+
本 skill 每次调用 = 无状态独立 Sprint,无跨轮次状态,故不进行 Retrospective。所有 Backlog Items 完成后:
|
|
95
|
+
|
|
96
|
+
- **对照 Sprint Goal 验证**:产出的是否为 `{{count}}` 条符合 `{{format}}` 格式、`{{language}}` 语言的 JSON 数组且通过 schema 校验?输出语义是否正确(写文件输出路径 / stdout 输出数组)?
|
|
97
|
+
- **展示 Increment**:输出文件路径或 stdout 的 JSON 数组。
|
|
98
|
+
|
|
99
|
+
## 约束
|
|
100
|
+
|
|
101
|
+
- 只处理已声明字段(source/format/count/language/output),忽略所有其他传入参数(如 `url`),**禁止**以任何形式使用它们。
|
|
102
|
+
- **禁止使用 WebFetch 或任何网络请求、禁止访问外部网络**;`source`/`format` 不合法时向 stderr 输出错误信息,绝不自行获取内容。
|
|
103
|
+
- 写文件一律用 `write` 工具;读文件用 `read` 工具;中间数据写入临时文件,以 stdin 重定向传给 node。
|
|
104
|
+
- 禁止使用未授权的 `cp`/`rm`/`mv` 等命令;需要复制、移动或删除临时文件时用 `node -e` 的 fs 模块完成。
|
|
105
|
+
- 中间产物完成后清理,禁止写入 output 以外的任何持久文件。
|
|
106
|
+
|
|
107
|
+
## references/ 目录结构
|
|
108
|
+
|
|
109
|
+
每个 format 需要两个文件,schema 定义为**数组**(`minItems: 1`),`items` 描述单个 item 的结构:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
references/
|
|
113
|
+
├── question.md # 社交媒体问题 prompt
|
|
114
|
+
├── question.schema.json5 # 输出 JSON Schema
|
|
115
|
+
├── status.md # 社交媒体动态 prompt
|
|
116
|
+
├── status.schema.json5
|
|
117
|
+
├── gallery.md # 社交媒体图集 prompt
|
|
118
|
+
├── gallery.schema.json5
|
|
119
|
+
├── article.md # 社交媒体图文文章 prompt
|
|
120
|
+
├── article.schema.json5
|
|
121
|
+
└── validate-schema.js # schema 校验脚本(stdin 输入)
|
|
122
122
|
```
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
# 社交媒体图文文章(article)创作 Sprint
|
|
2
|
-
|
|
3
|
-
## Sprint Goal
|
|
4
|
-
|
|
5
|
-
产出 `{{count}}` 篇适合社交媒体传播的图文文章,整体为 JSON 数组。
|
|
6
|
-
|
|
7
|
-
## Style(默认创作风格,可由 `style` 参数覆盖)
|
|
8
|
-
|
|
9
|
-
基于原始素材创作:
|
|
10
|
-
|
|
11
|
-
1. **标题抓人**:有吸引力、有冲突点,读者靠标题决定是否点开
|
|
12
|
-
2. **节奏快**:段落短、节奏快,适合快速阅读
|
|
13
|
-
|
|
14
|
-
## Format(输出契约,不可被 `style` 覆盖)
|
|
15
|
-
|
|
16
|
-
- **结构**:每 item = `title`(10-30 cn_length)+ `blocks`(array,1-20 个,每个含 `type`(text/image)+ `content`)
|
|
17
|
-
- **图文混排**:文本块与图片块交替出现,建议文本为主、图片辅助
|
|
18
|
-
- **图片**:从素材中提取图片地址作为 `{"type": "image"}` 块,最多 5 个图片块;素材无图片时全部用 `{"type": "text"}` 块
|
|
19
|
-
- **真实性**:从素材中提炼核心信息,重组为流畅文章,不能凭空编造
|
|
20
|
-
- **输出形式**:整体为 JSON 数组,含 `{{count}}` 个 item;仅输出数组,不包含任何解释、思考过程或额外文本,禁止输出单个对象
|
|
21
|
-
|
|
22
|
-
> 字数计算采用 **cn_length** 规则:中文字符算 1,非中文字符(英文/数字/符号)算 0.5,结果向上取整。
|
|
23
|
-
|
|
24
|
-
示例:
|
|
25
|
-
|
|
26
|
-
```json
|
|
27
|
-
[
|
|
28
|
-
{
|
|
29
|
-
"title": "三星二季度营业利润暴涨18倍,AI存储成最大赢家",
|
|
30
|
-
"blocks": [
|
|
31
|
-
{"type": "text", "content": "市场对DRAM、NAND的供不应求,助推三星电子迎来史上空前的盈利预期。"},
|
|
32
|
-
{"type": "image", "content": "https://example.com/pic1.jpg"},
|
|
33
|
-
{"type": "text", "content": "花旗研究所报告显示,二季度DRAM均价环比上涨44%,NAND涨幅达53%。"}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
]
|
|
1
|
+
# 社交媒体图文文章(article)创作 Sprint
|
|
2
|
+
|
|
3
|
+
## Sprint Goal
|
|
4
|
+
|
|
5
|
+
产出 `{{count}}` 篇适合社交媒体传播的图文文章,整体为 JSON 数组。
|
|
6
|
+
|
|
7
|
+
## Style(默认创作风格,可由 `style` 参数覆盖)
|
|
8
|
+
|
|
9
|
+
基于原始素材创作:
|
|
10
|
+
|
|
11
|
+
1. **标题抓人**:有吸引力、有冲突点,读者靠标题决定是否点开
|
|
12
|
+
2. **节奏快**:段落短、节奏快,适合快速阅读
|
|
13
|
+
|
|
14
|
+
## Format(输出契约,不可被 `style` 覆盖)
|
|
15
|
+
|
|
16
|
+
- **结构**:每 item = `title`(10-30 cn_length)+ `blocks`(array,1-20 个,每个含 `type`(text/image)+ `content`)
|
|
17
|
+
- **图文混排**:文本块与图片块交替出现,建议文本为主、图片辅助
|
|
18
|
+
- **图片**:从素材中提取图片地址作为 `{"type": "image"}` 块,最多 5 个图片块;素材无图片时全部用 `{"type": "text"}` 块
|
|
19
|
+
- **真实性**:从素材中提炼核心信息,重组为流畅文章,不能凭空编造
|
|
20
|
+
- **输出形式**:整体为 JSON 数组,含 `{{count}}` 个 item;仅输出数组,不包含任何解释、思考过程或额外文本,禁止输出单个对象
|
|
21
|
+
|
|
22
|
+
> 字数计算采用 **cn_length** 规则:中文字符算 1,非中文字符(英文/数字/符号)算 0.5,结果向上取整。
|
|
23
|
+
|
|
24
|
+
示例:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
[
|
|
28
|
+
{
|
|
29
|
+
"title": "三星二季度营业利润暴涨18倍,AI存储成最大赢家",
|
|
30
|
+
"blocks": [
|
|
31
|
+
{"type": "text", "content": "市场对DRAM、NAND的供不应求,助推三星电子迎来史上空前的盈利预期。"},
|
|
32
|
+
{"type": "image", "content": "https://example.com/pic1.jpg"},
|
|
33
|
+
{"type": "text", "content": "花旗研究所报告显示,二季度DRAM均价环比上涨44%,NAND涨幅达53%。"}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
37
|
```
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
{
|
|
2
|
-
// 省略 $schema 字段,避免 bash -c "" 中 $ 展开问题
|
|
3
|
-
"title": "文章格式",
|
|
4
|
-
"description": "社交媒体图文文章(article)输出校验 schema(数组,至少 1 个 item)",
|
|
5
|
-
"type": "array",
|
|
6
|
-
"minItems": 1,
|
|
7
|
-
"items": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"properties": {
|
|
10
|
-
"title": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"description": "文章标题,10-30 字(cn_length),需有吸引力"
|
|
13
|
-
},
|
|
14
|
-
"blocks": {
|
|
15
|
-
"type": "array",
|
|
16
|
-
"description": "正文块列表,1-20 行,图文混排",
|
|
17
|
-
"minItems": 1,
|
|
18
|
-
"maxItems": 20,
|
|
19
|
-
"items": {
|
|
20
|
-
"type": "object",
|
|
21
|
-
"properties": {
|
|
22
|
-
"type": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"enum": ["text", "image"],
|
|
25
|
-
"description": "块类型:text 文本 / image 图片"
|
|
26
|
-
},
|
|
27
|
-
"content": {
|
|
28
|
-
"type": "string",
|
|
29
|
-
"description": "文本段落内容或图片地址"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"required": ["type", "content"],
|
|
33
|
-
"additionalProperties": false
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"required": ["title", "blocks"],
|
|
38
|
-
"additionalProperties": false
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
{
|
|
2
|
+
// 省略 $schema 字段,避免 bash -c "" 中 $ 展开问题
|
|
3
|
+
"title": "文章格式",
|
|
4
|
+
"description": "社交媒体图文文章(article)输出校验 schema(数组,至少 1 个 item)",
|
|
5
|
+
"type": "array",
|
|
6
|
+
"minItems": 1,
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"title": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "文章标题,10-30 字(cn_length),需有吸引力"
|
|
13
|
+
},
|
|
14
|
+
"blocks": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"description": "正文块列表,1-20 行,图文混排",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"maxItems": 20,
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"type": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": ["text", "image"],
|
|
25
|
+
"description": "块类型:text 文本 / image 图片"
|
|
26
|
+
},
|
|
27
|
+
"content": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "文本段落内容或图片地址"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": ["type", "content"],
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": ["title", "blocks"],
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# 社交媒体图集(gallery)创作 Sprint
|
|
2
|
-
|
|
3
|
-
## Sprint Goal
|
|
4
|
-
|
|
5
|
-
产出 `{{count}}` 个适合社交媒体传播的图集内容,整体为 JSON 数组。
|
|
6
|
-
|
|
7
|
-
## Style(默认创作风格,可由 `style` 参数覆盖)
|
|
8
|
-
|
|
9
|
-
基于原始素材创作:
|
|
10
|
-
|
|
11
|
-
1. **标题吸引**:点明图集主题,有看点、让人想点开
|
|
12
|
-
|
|
13
|
-
## Format(输出契约,不可被 `style` 覆盖)
|
|
14
|
-
|
|
15
|
-
- **结构**:每 item = `title`(10-30 cn_length)+ `images`(array,1-50 个,每个含 `url` + `title`(10-30 cn_length))
|
|
16
|
-
- **配说明**:每张图必须带 `title` 简要说明图片内容——schema 必填,不可省略
|
|
17
|
-
- **图片来源**:从原始素材中提取图片地址,素材中图片不足时可适当精选
|
|
18
|
-
- **真实性**:从素材中提炼主题,不能凭空编造
|
|
19
|
-
- **输出形式**:整体为 JSON 数组,含 `{{count}}` 个 item;仅输出数组,不包含任何解释、思考过程或额外文本,禁止输出单个对象
|
|
20
|
-
|
|
21
|
-
> 字数计算采用 **cn_length** 规则:中文字符算 1,非中文字符(英文/数字/符号)算 0.5,结果向上取整。
|
|
22
|
-
|
|
23
|
-
示例:
|
|
24
|
-
|
|
25
|
-
```json
|
|
26
|
-
[
|
|
27
|
-
{
|
|
28
|
-
"title": "三星电子二季度财报亮点图集",
|
|
29
|
-
"images": [
|
|
30
|
-
{"url": "https://example.com/pic1.jpg", "title": "三星第二季度初步财报发布"},
|
|
31
|
-
{"url": "https://example.com/pic2.jpg", "title": "全球存储芯片供需格局"}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
]
|
|
1
|
+
# 社交媒体图集(gallery)创作 Sprint
|
|
2
|
+
|
|
3
|
+
## Sprint Goal
|
|
4
|
+
|
|
5
|
+
产出 `{{count}}` 个适合社交媒体传播的图集内容,整体为 JSON 数组。
|
|
6
|
+
|
|
7
|
+
## Style(默认创作风格,可由 `style` 参数覆盖)
|
|
8
|
+
|
|
9
|
+
基于原始素材创作:
|
|
10
|
+
|
|
11
|
+
1. **标题吸引**:点明图集主题,有看点、让人想点开
|
|
12
|
+
|
|
13
|
+
## Format(输出契约,不可被 `style` 覆盖)
|
|
14
|
+
|
|
15
|
+
- **结构**:每 item = `title`(10-30 cn_length)+ `images`(array,1-50 个,每个含 `url` + `title`(10-30 cn_length))
|
|
16
|
+
- **配说明**:每张图必须带 `title` 简要说明图片内容——schema 必填,不可省略
|
|
17
|
+
- **图片来源**:从原始素材中提取图片地址,素材中图片不足时可适当精选
|
|
18
|
+
- **真实性**:从素材中提炼主题,不能凭空编造
|
|
19
|
+
- **输出形式**:整体为 JSON 数组,含 `{{count}}` 个 item;仅输出数组,不包含任何解释、思考过程或额外文本,禁止输出单个对象
|
|
20
|
+
|
|
21
|
+
> 字数计算采用 **cn_length** 规则:中文字符算 1,非中文字符(英文/数字/符号)算 0.5,结果向上取整。
|
|
22
|
+
|
|
23
|
+
示例:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
[
|
|
27
|
+
{
|
|
28
|
+
"title": "三星电子二季度财报亮点图集",
|
|
29
|
+
"images": [
|
|
30
|
+
{"url": "https://example.com/pic1.jpg", "title": "三星第二季度初步财报发布"},
|
|
31
|
+
{"url": "https://example.com/pic2.jpg", "title": "全球存储芯片供需格局"}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
35
|
```
|