Skip to content

Commit c0b4495

Browse files
committed
docs(assets): 补 README.md + OpenSpec change archive
继续 ea00451: - assets/README.md:剩余 4 资产的清单 + 添加/删除 checklist - OpenSpec: asset-canonicalization (2 Requirements) 已合入
1 parent ea00451 commit c0b4495

7 files changed

Lines changed: 174 additions & 0 deletions

File tree

‎assets/README.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# assets/
2+
3+
本目录下的每个文件都**至少被一个 tracked 消费者引用**。删除或新增资产前请同步更新本表。
4+
5+
| 文件 | 角色 | 消费者 |
6+
|---|---|---|
7+
| `banner.svg` | README 顶部 hero 图(英文 + 简体中文) | `README.md:4`, `README.zh-CN.md:4` |
8+
| `composer-icon.png` | Codex CLI Composer 区入口图标 | `.codex-plugin/plugin.json` → `composerIcon` |
9+
| `official-logo.png` | 插件主 logo(light/dark 共用) | `.codex-plugin/plugin.json` → `logo`/`logoDark`;市场仓 CDN URL(`@v<x.y.z>` 钉定) |
10+
| `79a62959-c42e-42d1-9b45-a0f6b7c3f670.png` | 历史 UUID 命名资产,来源与用途不明;保留为安全网(删除前需在外部 archive 仓验证零价值) | 零当前引用 |
11+
12+
## 添加新资产的清单
13+
14+
1. 把文件放入 `assets/`。
15+
2. **同一 commit** 更新本文件(行 + 来源 + 消费者列)。
16+
3. 若该文件会进 marketplace icon / logo,更新 `.agents/plugins/marketplace.json` 的 `icon` 与 `logo`,并按 `bump-plugin.mjs` 流程 bump 版本号。
17+
4. 跑 `python3 scripts/validate_languages_json.py` 与 `python3 tests/run_all.py`——确保 vendor check 不爆。
18+
19+
## 删除资产的清单
20+
21+
1. `git grep` 全仓确认零引用(含 README、docs/、manifest、市场仓镜像、CI 脚本)。
22+
2. 确认 CDN URL 不引用(marketplace + Codex manifest + ZCode manifest + Kimi)。
23+
3. `git rm` + 本表删除行 + 同一 commit。
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
schema: spec-driven
2+
created: 2026-09-22
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Context
2+
3+
实测 grep 证据(2026-09-22 v0.6.5):
4+
5+
| 资产 | 引用源 | 角色 |
6+
|---|---|---|
7+
| `assets/banner.svg` | `README.md:4` / `README.zh-CN.md:4` | README 顶部 hero 图 |
8+
| `assets/composer-icon.png` | `.codex-plugin/plugin.json:44` (composerIcon) | Codex CLI Composer 区入口图标 |
9+
| `assets/official-logo.png` | `.codex-plugin/plugin.json:45,46` / `.agents/plugins/marketplace.json:21,25`(CDN @v0.6.5) | Codex manifest logo + marketplace icon + marketplace logo |
10+
| `assets/logo.png` | **零引用** | 命名重复,且与 `official-logo.png` 视觉上无差异 |
11+
| `assets/official-logo.svg` | **零引用** | 双形态中的「vector 版本」——但所有 manifest 与 marketplace 都钉 png |
12+
| `assets/79a62959-…png` | (UUID 命名的) | 历史资产,零引用 |
13+
14+
## Decisions
15+
16+
### 删除策略
17+
18+
只删**已验证零引用**的两个:`logo.png` 与 `official-logo.svg`。
19+
20+
- **不删 `logo.png` 的旧引用**:仓库从 `chore/release-v0.6.0` 起引用就是 `official-logo.png`,旧 `logo.png` 是历史残留。
21+
- **不删 `79a62959-…png`**:UUID 命名通常为外部系统上传的截图,可能是旧 marketplace cache。删它需要先在 archive 仓或文档仓库验证零价值——超出本 change 范围。
22+
- **不删 `banner.svg`**:README 直接 `<img src>` 引用。
23+
- **不删 `composer-icon.png`**:codex manifest 的 `composerIcon` 字段钉死它。
24+
25+
### assets/README.md 内容
26+
27+
清单 + 每项用途 + 未来添加新资产应更新本文件 + 与 marketplace icon 同步更新流程。
28+
29+
### 风险
30+
31+
- `git log --follow` 还能找回删除的文件——若有用户用旧 release 引到 `logo.png`,他们只能去 archive 仓。已实测该文件 v0.6.0 前未被 manifest 引用。
32+
- CDN 旧 version 引用的 `official-logo.png` 不受影响——只删仓内未发布版本。
33+
- **绝对不在 marketplace CDN URL 里使用 SVG**——`.agents/plugins/marketplace.json` 的 `icon` 与 `logo` 都是 png,删除 SVG 不影响 CDN 行为。
34+
35+
## Risks / Trade-offs
36+
37+
- 删除是单向操作。仓库大小 -2 文件,可忽略。
38+
- assets/README.md 变成 load-bearing 文档——必须与 README 的 `<img>` 同步更新(已在 spec 里作为 Requirement 2)。
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Why
2+
3+
`assets/` 目录里有 6 个文件:1 个 banner.svg(README 用)、1 个 composer-icon.png(codex manifest 用)、1 个 logo.png(**零引用**)、1 个 official-logo.png(marketplace + codex + zcode 用)、1 个 official-logo.svg(**零引用**)。MEDIUM #9 评审指出:双形态(png/svg)+ 重复 logo 名带来三问题——
4+
5+
1. SVG 文件从未被引用,但留在仓内误导「也许应该用 SVG」。
6+
2. `logo.png` 与 `official-logo.png` 名称几乎重复,下载/分发时易混淆。
7+
3. CDN 钉的是 `@v0.6.5/assets/official-logo.png`,删错文件会爆图标 404。
8+
9+
## What Changes
10+
11+
- 删除 `assets/logo.png`(零引用)。
12+
- 删除 `assets/official-logo.svg`(零引用)。
13+
- 保留 `assets/banner.svg`(README 用)、`assets/composer-icon.png`(codex manifest 用)、`assets/official-logo.png`(CDN/marketplace 钉的)。
14+
- 不修改任何 manifest、不修改 README、不修改 docs。
15+
- 在 `assets/README.md`(新建)记录每个文件的用途,便于未来维护。
16+
17+
## Capabilities
18+
19+
### New Capabilities
20+
21+
- `asset-canonicalization`: Defines which `assets/*` files are load-bearing for marketplace / manifests / README and which may be deleted without breaking any consumer.
22+
23+
### Modified Capabilities
24+
25+
None.
26+
27+
## Impact
28+
29+
删除 2 个零引用资产,零行为变化。新增 ~20 行 `assets/README.md`。
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## ADDED Requirements
2+
3+
### Requirement: Zero-reference marketing assets SHALL be removed
4+
5+
Files in `assets/` with no references in any tracked file (manifests, READMEs, docs, market manifests) SHALL be removed. After removal, every remaining `assets/*` file SHALL appear in at least one `assets/README.md` row.
6+
7+
#### Scenario: Removing logo.png breaks no consumer
8+
9+
- **WHEN** `assets/logo.png` is deleted
10+
- **THEN** no source file (README, manifest, marketplace, docs) refers to it; no image 404 appears in GitHub README rendering
11+
12+
#### Scenario: Removing official-logo.svg breaks no consumer
13+
14+
- **WHEN** `assets/official-logo.svg` is deleted
15+
- **THEN** no manifest or marketplace entry refers to the SVG variant; no CDN URL points at the file
16+
17+
### Requirement: assets/README.md SHALL document every remaining file
18+
19+
After consolidation, `assets/README.md` SHALL list every remaining asset with: filename, role, current consumer(s), and source (where it was originally generated or acquired). Future asset additions SHALL update this file in the same commit.
20+
21+
#### Scenario: Adding a new marketing asset
22+
23+
- **WHEN** a contributor adds `assets/example.png`
24+
- **THEN** the same commit updates `assets/README.md` to include the new file with its role and consumer
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## 1. Audit
2+
3+
- [ ] 1.1 Run `grep -rn 'logo\.png\b\|official-logo\.svg'` (excluding `.git`) — verify zero matches for both files.
4+
- [ ] 1.2 Run `grep -rn 'official-logo\.\(png\|svg\)\|composer-icon\|banner' .agents/ .codex-plugin/ .zcode-plugin/ kimi.plugin.json README.md README.zh-CN.md` — record which consumer uses which file.
5+
6+
## 2. Deletion
7+
8+
- [ ] 2.1 Delete `assets/logo.png`.
9+
- [ ] 2.2 Delete `assets/official-logo.svg`.
10+
- [ ] 2.3 Verify `git status` shows only these two deletions + new `assets/README.md` (and any spec archive files).
11+
12+
## 3. Documentation
13+
14+
- [ ] 3.1 Create `assets/README.md` with a Markdown table listing the four remaining files (banner.svg, composer-icon.png, official-logo.png, 79a62959-…png — note the last as legacy/unknown provenance).
15+
16+
## 4. Validation
17+
18+
- [ ] 4.1 `python3 -m unittest discover -s tests -p 'test_*.py' -v` — all pass.
19+
- [ ] 4.2 `python3 tests/run_all.py` — full 141 / 0 / 0 must hold.
20+
- [ ] 4.3 `git diff --check` — clean.
21+
- [ ] 4.4 `openspec validate --all --strict` — pass.
22+
23+
## 5. Release
24+
25+
- [ ] 5.1 `node scripts/bump-plugin.mjs codeguard patch` — bump 0.6.5 → 0.6.6.
26+
- [ ] 5.2 Fix in-repo `.agents/plugins/marketplace.json` ref/icon to `v0.6.6`.
27+
- [ ] 5.3 Open PR, wait for vendor-check, merge.
28+
- [ ] 5.4 Tag v0.6.6 (force-move if origin tag v0.6.5/0.6.4 stale).
29+
- [ ] 5.5 Sync market repo catalog + README codeguard row to `0.6.6` and push.
30+
- [ ] 5.6 `openspec archive consolidate-marketing-assets`.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# asset-canonicalization Specification
2+
3+
## Purpose
4+
TBD - created by archiving change consolidate-marketing-assets. Update Purpose after archive.
5+
## Requirements
6+
### Requirement: Zero-reference marketing assets SHALL be removed
7+
8+
Files in `assets/` with no references in any tracked file (manifests, READMEs, docs, market manifests) SHALL be removed. After removal, every remaining `assets/*` file SHALL appear in at least one `assets/README.md` row.
9+
10+
#### Scenario: Removing logo.png breaks no consumer
11+
12+
- **WHEN** `assets/logo.png` is deleted
13+
- **THEN** no source file (README, manifest, marketplace, docs) refers to it; no image 404 appears in GitHub README rendering
14+
15+
#### Scenario: Removing official-logo.svg breaks no consumer
16+
17+
- **WHEN** `assets/official-logo.svg` is deleted
18+
- **THEN** no manifest or marketplace entry refers to the SVG variant; no CDN URL points at the file
19+
20+
### Requirement: assets/README.md SHALL document every remaining file
21+
22+
After consolidation, `assets/README.md` SHALL list every remaining asset with: filename, role, current consumer(s), and source (where it was originally generated or acquired). Future asset additions SHALL update this file in the same commit.
23+
24+
#### Scenario: Adding a new marketing asset
25+
26+
- **WHEN** a contributor adds `assets/example.png`
27+
- **THEN** the same commit updates `assets/README.md` to include the new file with its role and consumer
28+

0 commit comments

Comments
 (0)