Skip to content

Commit baa8afb

Browse files
committed
docs(skills): 优化视觉资产与对象处理流程
1 parent 68cdd80 commit baa8afb

28 files changed

Lines changed: 667 additions & 125 deletions

.agents/plugins/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aisee-plugin",
3-
"version": "0.9.0",
3+
"version": "0.9.1",
44
"interface": {
55
"displayName": "Aisee Plugin",
66
"description": "Aisee plugin marketplace for OpenSpec, project memory, team knowledge, and Compound Engineering workflows."

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44

55
## [Unreleased]
66

7+
## [0.9.1] - 2026-06-11
8+
9+
### Added
10+
11+
- `aisee:design-assets` 新增素材生成前的 Asset Intent Scan、banner 文本策略、受控局部内容优化 prompt 与对应 eval 覆盖。
12+
- `aisee:image-object` 新增透明素材 handoff、全局运行环境复用、GUI 预览缓存治理与对应 eval 覆盖。
13+
14+
### Changed
15+
16+
- `aisee:image-object` 主 skill 精简为轻量路由文档,详细 GUI、依赖、workflow 和 handoff 规则下沉到 references。
17+
- `aisee:design-assets` 明确 Image2 / `gpt-image-2` 为参考图、视觉变体和生成型素材默认目标模型。
18+
719
### Added
820

921
- `source-map.md` 新增 `intake_sources` 兼容路径,支持无 SRS / UI / Architecture 前置文档时记录精简 intake 来源。

plugins/aisee-plugin/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aisee-plugin",
3-
"version": "0.9.0",
3+
"version": "0.9.1",
44
"description": "AI-Enhanced Software Engineering plugin for OpenSpec and Compound Engineering workflows.",
55
"author": {
66
"name": "Fengliang"

plugins/aisee-plugin/.codex-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aisee-plugin",
3-
"version": "0.9.0",
3+
"version": "0.9.1",
44
"description": "AI-Enhanced Software Engineering plugin for OpenSpec and Compound Engineering workflows.",
55
"author": {
66
"name": "Fengliang"

plugins/aisee-plugin/.cursor-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aisee-plugin",
3-
"version": "0.9.0",
3+
"version": "0.9.1",
44
"description": "AI-Enhanced Software Engineering plugin for OpenSpec and Compound Engineering workflows.",
55
"author": {
66
"name": "Fengliang"

plugins/aisee-plugin/skills/aisee-design-assets/SKILL.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ rg --files | rg '(style.*spec.*\.(md|json)|design.*asset.*index.*\.md|asset.*man
7676
- 视觉质量优先、用户上传参考图/截图、图片转视觉 brief 或 image-first 工作流:读 `references/image-first.md`
7777
- Image2 图片生成、图生图视觉变体、透明生成型素材、CLI fallback:读 `references/image-generation.md`
7878
- 提取或生成 StyleSpec 草稿:读 `references/style-spec.md`
79-
- 规划、生成或复核素材清单:读 `references/asset-manifest.md`
79+
- 规划、生成或复核素材清单,识别素材边界和 banner 文字策略:读 `references/asset-manifest.md`
8080
- 生成前提示词优化:必须读 `references/prompt-optimization.md`
8181
- 需要借鉴中文图片生成 prompt 写法:读 `references/prompt-library.md`
8282
- 不同端尺寸、清晰度、安全区、图生图保留项:读 `references/output-specs.md`
@@ -97,6 +97,7 @@ rg --files | rg '(style.*spec.*\.(md|json)|design.*asset.*index.*\.md|asset.*man
9797
7. 需要进入 Figma MCP 或前端开发:生成对应 brief;前端只拿 `dev-visual-brief` 做视觉输入,不让本 skill 写代码。
9898
8. 要从已有扁平图片中分离对象、生成 mask、交互式框选/点选、导出透明对象、移除对象并补背景或生成图层包:交给 `aisee:image-object`;本 skill 只负责把产物登记到设计资产索引。
9999
9. 要透明素材:从零生成的独立透明素材留在本 skill,先用 Image2 生成绿幕/纯色背景或按 CLI 原生透明流程处理;从已有图片提取透明对象、修边、抠图、去背景或 mask 的流程交给 `aisee:image-object`
100+
10. 要局部内容优化、补细节、增强氛围或完善某个区域:先理解用户意图,明确修改范围、保留项和禁止项;不需要精确 mask 的视觉增强可由本 skill 优化 prompt 后驱动 Image2 生成候选,需要精确区域、对象、抠图、修边或背景修补时先交给 `aisee:image-object` 准备 source/mask/bbox。
100101

101102
## Phase 2 — 输入门禁
102103

@@ -116,7 +117,7 @@ rg --files | rg '(style.*spec.*\.(md|json)|design.*asset.*index.*\.md|asset.*man
116117

117118
## Phase 3 — 执行
118119

119-
执行前必须做轻量提示词优化:整理结构,补齐平台、用途、尺寸、参考依据、主体、构图、风格、不变项、允许变化和避免项;不添加未确认的业务需求、Logo、文案、人物、字段或数据。
120+
执行前必须先理解用户意图,再做轻量提示词优化:整理结构,补齐平台、用途、尺寸、参考依据、素材边界、文本策略、主体、构图、风格、不变项、允许变化和避免项;不添加未确认的业务需求、Logo、文案、人物、字段或数据。
120121

121122
CHECKPOINT: 执行图片生成、图生图视觉变体、外部 API 调用、刷新远程提示词来源、覆盖既有图片/索引或写入长期资产前,必须确认目标、输入来源、输出目录、是否覆盖、是否使用外部 API、成本/配额风险和敏感信息处理。未确认时只输出方案、提示词和待确认项,不声称已生成。
122123

@@ -131,6 +132,7 @@ CHECKPOINT: 执行图片生成、图生图视觉变体、外部 API 调用、刷
131132

132133
- 普通参考图、视觉变体和生成型素材明确以 Image2 为目标模型:内置 `image_gen` 可用时优先使用内置工具;CLI/API fallback 默认使用 `gpt-image-2`,只有原生透明等模型能力不支持时才使用其它模型。
133134
- 透明素材先分流:从零生成的独立主体由本 skill 做 Image2 prompt 完善、绿幕/纯色背景生成和去背景,或按 `references/image-generation.md` 的原生透明 fallback;从已有图片提取透明对象、mask、cutout、修边、去背景和导出变体必须交给 `aisee:image-object`,本 skill 只登记最终产物。
135+
- 局部内容优化先分流:松散的视觉增强、氛围补充、背景丰富度、构图微调可由本 skill 生成受控编辑候选;需要像素级范围、mask、对象边缘、抠图、局部抹除或背景修补时必须交给 `aisee:image-object` 准备 handoff。
134136
- 项目绑定图片、prompt 摘要、索引和 brief 必须写入目标项目目录。
135137
- Prompt 只注入当前任务必要约束,不把全部规则一次性塞进图片模型请求;通用 UI 图标只做占位,最终由图标库替换。
136138

plugins/aisee-plugin/skills/aisee-design-assets/assets/asset-manifest-template.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@
55
- 关联 StyleSpec:
66
- 更新时间:
77

8+
## 素材识别
9+
10+
| 区域 | 视觉元素 | UI/素材判断 | generation_decision | asset_boundary | text_policy | 图标策略 | 还原要求 | 风险 |
11+
|------|----------|-------------|---------------------|----------------|-------------|----------|----------|------|
12+
813
## 素材
914

10-
| ID | 文件 | 类型 | 用途 | style_anchor | style_lock | allowed_variation | 透明 | 尺寸 | 生成/提取模式 | consistency_check | 状态 | 风险/备注 |
11-
|----|------|------|------|--------------|------------|-------------------|------|------|---------------|-------------------|------|-----------|
15+
| ID | 文件 | 类型 | 用途 | generation_decision | asset_boundary | text_policy | style_anchor | style_lock | allowed_variation | 透明 | 尺寸 | 生成/提取模式 | consistency_check | 状态 | 风险/备注 |
16+
|----|------|------|------|---------------------|----------------|-------------|--------------|------------|-------------------|------|------|---------------|-------------------|------|-----------|
1217

1318
## 图标映射
1419

plugins/aisee-plugin/skills/aisee-design-assets/assets/prompt-template-asset.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
任务类型:生成单个可复用设计素材。
55
目标模型:Image2 / gpt-image-2
66
素材类型:<background | illustration | overlay | layout-layer | transparent>
7+
generation_decision:<generate | icon-library | css-svg | image-object-handoff | use-existing>
8+
asset_boundary:<full-banner | banner-background | illustration-subject | decorative-layer | transparent-subject | section-background | other>
9+
text_policy:<no-text | editable-text-zone | raster-text-confirmed>
710
目标平台:<mobile | mini-program | h5 | pc | desktop | multi>
811
使用位置:<页面/模块/组件>
912
建议尺寸:<WIDTHxHEIGHT>
@@ -14,6 +17,7 @@ style_anchor:<主参考图 / StyleSpec / design-spec path>
1417
style_lock:<必须保持的颜色、线条、圆角、材质、光照、构图密度、品牌元素>
1518
allowed_variation:<允许变化的主体、尺寸、裁切、状态、背景或透明范围>
1619
主体描述:<素材主体>
20+
文字与安全区:<不生成文字 / 预留可编辑文字区 / 已确认生成 raster text 和文案>
1721
视觉风格:<色彩、材质、光影、图形语言>
1822
构图要求:<居中/留白/边距/适合叠加>
1923
一致性检查:生成后对照 style_anchor 检查色板、线条语言、阴影/光照、材质、构图密度和品牌元素。
Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
# 受控图片编辑 Handoff 模板
1+
# 受控图片编辑 Prompt 模板
22

3-
本模板只用于把 `aisee:image-object` 的 source、mask、cutout、bbox 和保护约束转成受控编辑 brief。不要用它替代对象提取、去背景、mask 生产、背景修补或图层包生成
3+
本模板用于把用户的局部优化意图整理成受控图片编辑 brief。松散范围的视觉完善可由 `aisee:design-assets` 直接驱动 Image2 生成候选;需要精确对象、mask、bbox、cutout、去背景、边缘修复或背景修补时,必须先由 `aisee:image-object` 准备 handoff
44

55
```text
6-
任务类型:基于 image-object workspace 的受控编辑候选。
6+
任务类型:受控局部内容优化 / 基于 image-object workspace 的受控编辑候选。
7+
目标模型:Image2 / gpt-image-2
78
编辑目标:<image path>
8-
workspace:<aisee/docs/image-objects/...>
9+
workspace:<可选;aisee/docs/image-objects/...>
910
目标平台:<mobile | mini-program | h5 | pc | desktop | multi>
11+
用户意图摘要:<用户真正想改善的问题>
1012
区域描述:<从对话提炼出的自然语言描述,说明需要优化的区域和问题>
11-
区域定位:<mask 路径 / bbox / region id / object id,必须能限制修改范围>
12-
保留项:<必须保持不变的主体、构图、风格、比例、颜色或区域>
13-
修改项:<本轮要修改的内容>
14-
局部范围:<mask 路径 / bbox / object id / 指定区域>
13+
区域定位:<自然语言区域;如有 mask 路径 / bbox / region id / object id 必须写>
14+
保留项:<必须保持不变的主体、构图、风格、比例、颜色、文字区或未授权区域>
15+
修改项:<本轮只允许新增、优化或修正的内容>
16+
文本策略:<no-text | editable-text-zone | raster-text-confirmed>
17+
局部范围:<semantic-area | mask path | bbox | object id>
18+
handoff_required:<yes | no;需要精确 mask/object 时写 yes>
1519
输出尺寸:<WIDTHxHEIGHT 或保持原尺寸>
1620
输出格式:<png | webp | jpeg>
1721
必须避免:新增文字、Logo、水印、无关主体、改变未授权区域、破坏原图风格一致性。
18-
输出要求:保存为 image-object workspace 的 enhanced 候选,不覆盖原图
22+
输出要求:生成新候选,不覆盖原图;如果来自 image-object,保存为 workspace 的 enhanced 候选。
1923
```

plugins/aisee-plugin/skills/aisee-design-assets/evals/evals.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,86 @@
4242
"design-assets 只提供视觉输入,不替代 UI Content、Design Spec 或 OpenSpec artifacts。"
4343
],
4444
"files": []
45+
},
46+
{
47+
"id": "design-assets-002",
48+
"name": "scan-assets-before-generating-banner",
49+
"scenario": "asset-intent-scan",
50+
"prompt": "这张首页参考图里有一个带大标题、价格标签、CTA 按钮和右侧插画的 hero banner。帮我判断哪些素材需要生成,并准备后续生成提示词。",
51+
"context": {
52+
"files": [],
53+
"assumptions": [
54+
"下游是 App/Web/小程序界面实现,不是最终投放海报。"
55+
]
56+
},
57+
"expected_output": "应先做 Asset Intent Scan,区分 banner 背景、插画、装饰层、UI 文案、按钮和图标;默认不把标题、价格、CTA 文案生成进图片,而是预留可编辑文字区。",
58+
"expected_outputs": [
59+
"输出素材识别或素材决策表。",
60+
"明确 generation_decision、asset_boundary 和 text_policy。",
61+
"将 banner 文案、按钮和价格标签判定为可编辑 UI/运营文案。"
62+
],
63+
"must_ask": [],
64+
"must_include": [
65+
"Asset Intent Scan",
66+
"text_policy",
67+
"asset_boundary",
68+
"editable-text-zone"
69+
],
70+
"must_not": [
71+
"不得直接把整张 banner 作为带文字位图生成。",
72+
"不得把通用按钮、价格标签或 CTA 文案当作图片素材生成。",
73+
"不得跳过素材识别直接输出 Image2 prompt。"
74+
],
75+
"quality_checks": [
76+
"先判断哪些元素需要生成,再写生成提示词。",
77+
"Banner 默认只生成背景、插画和装饰层,文字保持可编辑。",
78+
"识别图标库、CSS/SVG、既有品牌资产和 image-object handoff 的边界。"
79+
],
80+
"fact_source_constraints": [
81+
"素材清单和 prompt 是设计资产输入,不替代 UI Content 或前端实现事实。"
82+
],
83+
"files": []
84+
},
85+
{
86+
"id": "design-assets-003",
87+
"name": "controlled-local-improvement-prompt",
88+
"scenario": "local-image-improvement",
89+
"prompt": "基于这张已选参考图,把 hero 右侧背景补得更丰富一点,保持布局和文字区不变,不要生成新文案。",
90+
"context": {
91+
"files": [],
92+
"assumptions": [
93+
"用户要的是松散范围的视觉增强,不是精确抠图、mask 修边或背景修补。"
94+
]
95+
},
96+
"expected_output": "应先理解用户意图,整理受控局部内容优化 prompt,明确 scope、preserve、modify、avoid 和 text_policy;可驱动 Image2 生成候选,但应标注没有 mask/bbox 时属于松散范围候选。",
97+
"expected_outputs": [
98+
"提炼用户意图摘要。",
99+
"明确只优化 hero 右侧背景或氛围层。",
100+
"保留布局、文字区、品牌和未授权区域。",
101+
"说明需要精确 mask 时应交给 image-object。"
102+
],
103+
"must_ask": [],
104+
"must_include": [
105+
"用户意图摘要",
106+
"局部范围",
107+
"必须保持",
108+
"text_policy",
109+
"Image2"
110+
],
111+
"must_not": [
112+
"不得要求模型重设计整张图。",
113+
"不得新增文字、Logo、水印或 CTA 文案。",
114+
"不得把精确对象边缘修复留在 design-assets 中执行。"
115+
],
116+
"quality_checks": [
117+
"把局部优化和 image-object handoff 分流清楚。",
118+
"Prompt 先写保留项,再写修改项和禁止项。",
119+
"输出新候选,不覆盖源图。"
120+
],
121+
"fact_source_constraints": [
122+
"局部优化候选必须记录来源、scope 和风险;不是最终实现事实。"
123+
],
124+
"files": []
45125
}
46126
]
47127
}

0 commit comments

Comments
 (0)