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