Skip to content

Commit e99aacd

Browse files
author
Hermes Agent
committed
docs: update readmes for asset fulfillment
1 parent c015697 commit e99aacd

3 files changed

Lines changed: 66 additions & 0 deletions

File tree

README.en.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,26 @@ Bitmap assets must follow role-based compression rules. Large assets should be s
116116

117117
If a critical visual role or critical asset is ambiguous, the skill must stop and ask instead of guessing.
118118

119+
## Asset Tools
120+
121+
The repository includes lightweight asset utilities:
122+
123+
```bash
124+
npm run scan-assets
125+
npm run optimize-assets -- --input assets/example.png --write
126+
npm run crop-atlas -- --manifest path/to/asset-fulfillment-manifest.json
127+
npm run validate-atlas -- --manifest path/to/asset-fulfillment-manifest.json
128+
```
129+
130+
Suggested use:
131+
132+
- `scan-assets`: check image role, format, and size policy
133+
- `optimize-assets`: convert selected images into suitable WebP assets
134+
- `crop-atlas`: crop independent files from an atlas using pixel coordinates
135+
- `validate-atlas`: check crop bounds, missing outputs, and output dimensions
136+
137+
Asset fulfillment should happen after the brief identifies missing assets and before page code is written. Do not generate images one-by-one during implementation unless a confirmed brief missed a critical asset.
138+
119139
## Input Shape
120140

121141
Canonical input:
@@ -182,5 +202,7 @@ This repository contains the skill specification, reference documents, asset sca
182202
- English README: [README.en.md](README.en.md)
183203
- Chinese skill overview: [README.md](README.md)
184204
- Skill spec: [skills/design-to-code/SKILL.md](skills/design-to-code/SKILL.md)
205+
- Asset fulfillment rules: [skills/design-to-code/references/asset-fulfillment-pipeline.md](skills/design-to-code/references/asset-fulfillment-pipeline.md)
206+
- Atlas rules: [skills/design-to-code/references/asset-atlas-generation.md](skills/design-to-code/references/asset-atlas-generation.md)
185207
- License: [LICENSE](LICENSE)
186208
- Release notes: [RELEASE_NOTES.md](RELEASE_NOTES.md)

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,26 @@ DesignToCode 采用“项目优先”规则:
116116

117117
如果关键视觉角色或关键资源存在歧义,skill 必须先停下来问,而不是猜。
118118

119+
## 资源工具
120+
121+
仓库内包含轻量资源工具:
122+
123+
```bash
124+
npm run scan-assets
125+
npm run optimize-assets -- --input assets/example.png --write
126+
npm run crop-atlas -- --manifest path/to/asset-fulfillment-manifest.json
127+
npm run validate-atlas -- --manifest path/to/asset-fulfillment-manifest.json
128+
```
129+
130+
使用建议:
131+
132+
- `scan-assets`:检查图片尺寸、格式和角色策略
133+
- `optimize-assets`:将选定图片转为合适的 WebP 资源
134+
- `crop-atlas`:从 atlas 大图按像素坐标裁切独立图片
135+
- `validate-atlas`:检查 atlas 坐标越界、输出缺失和尺寸不匹配
136+
137+
缺图补足的推荐时机是:先在 `Pre-Implementation Brief` 阶段整体盘点,再按策略批处理;不要写代码时遇到一张缺一张再临时生成。
138+
119139
## 输入格式
120140

121141
推荐输入格式:
@@ -184,5 +204,7 @@ DesignToCode 采用“项目优先”规则:
184204
- 中文主文档:[README.md](README.md)
185205
- English README:[README.en.md](README.en.md)
186206
- skill 主规范:[skills/design-to-code/SKILL.md](skills/design-to-code/SKILL.md)
207+
- 缺图补足规则:[skills/design-to-code/references/asset-fulfillment-pipeline.md](skills/design-to-code/references/asset-fulfillment-pipeline.md)
208+
- atlas 图集规则:[skills/design-to-code/references/asset-atlas-generation.md](skills/design-to-code/references/asset-atlas-generation.md)
187209
- 许可证:[LICENSE](LICENSE)
188210
- 发布记录:[RELEASE_NOTES.md](RELEASE_NOTES.md)

README.zh-CN.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,26 @@ DesignToCode 采用“项目优先”规则:
116116

117117
如果关键视觉角色或关键资源存在歧义,skill 必须先停下来问,而不是猜。
118118

119+
## 资源工具
120+
121+
仓库内包含轻量资源工具:
122+
123+
```bash
124+
npm run scan-assets
125+
npm run optimize-assets -- --input assets/example.png --write
126+
npm run crop-atlas -- --manifest path/to/asset-fulfillment-manifest.json
127+
npm run validate-atlas -- --manifest path/to/asset-fulfillment-manifest.json
128+
```
129+
130+
使用建议:
131+
132+
- `scan-assets`:检查图片尺寸、格式和角色策略
133+
- `optimize-assets`:将选定图片转为合适的 WebP 资源
134+
- `crop-atlas`:从 atlas 大图按像素坐标裁切独立图片
135+
- `validate-atlas`:检查 atlas 坐标越界、输出缺失和尺寸不匹配
136+
137+
缺图补足的推荐时机是:先在 `Pre-Implementation Brief` 阶段整体盘点,再按策略批处理;不要写代码时遇到一张缺一张再临时生成。
138+
119139
## 输入格式
120140

121141
推荐输入格式:
@@ -182,6 +202,8 @@ DesignToCode 采用“项目优先”规则:
182202
## 相关文件
183203

184204
- skill 主规范:[skills/design-to-code/SKILL.md](skills/design-to-code/SKILL.md)
205+
- 缺图补足规则:[skills/design-to-code/references/asset-fulfillment-pipeline.md](skills/design-to-code/references/asset-fulfillment-pipeline.md)
206+
- atlas 图集规则:[skills/design-to-code/references/asset-atlas-generation.md](skills/design-to-code/references/asset-atlas-generation.md)
185207
- 许可证:[LICENSE](LICENSE)
186208
- 发布记录:[RELEASE_NOTES.md](RELEASE_NOTES.md)
187209
- English README:[README.en.md](README.en.md)

0 commit comments

Comments
 (0)