docs: 校正 assets AGENTS.md,消除 GIF/镜像等错误描述

问题
- 4 份 assets/AGENTS.md 与 Task 1-5 后的实际状态全部相反:
  - 声称 core/app "内容同步/镜像" → 实际职责不同 (core 管 UI/WebP, app 管启动器)
  - 声称文件是 .gif → 实际是 .webp 动画
  - 声称由 AnimatedGif 加载 → 实际是 AnimatedWebp
  - app/assets/gifs/ 只剩过时 AGENTS.md (PNG 已被 Task 1 删)

改动
- core/assets/AGENTS.md: 移除"与 app 镜像"错误说法, 说明职责划分, 列 app_icon.webp
- core/assets/animations/AGENTS.md: GIF→WebP 正名, 说明构建期扫描机制 + 测试守卫,
  保留"历史命名曾为 gifs/"历史说明
- app/assets/AGENTS.md: 反映清理后为空, 警告勿再放图标源 PNG
- 删除 app/assets/gifs/ 过时空目录 (仅剩 1 个过时 AGENTS.md)

验证
- grep 全 assets 无真正错误描述 (剩余命中均为有意的纠正/历史说明)
- ./gradlew :app:assembleDebug → BUILD SUCCESSFUL
This commit is contained in:
xfy 2026-06-15 14:08:18 +08:00
parent ac41eef37b
commit 6e1c2a39ae
4 changed files with 30 additions and 56 deletions

View File

@ -1,25 +1,25 @@
<!-- Parent: ../AGENTS.md --> <!-- Parent: ../AGENTS.md -->
<!-- Generated: 2026-05-22 | Updated: 2026-05-22 --> <!-- Generated: 2026-05-22 | Updated: 2026-06-15 -->
# assets # assets
## Purpose ## Purpose
原始资产文件目录,存放不需要 Android 资源系统处理的二进制文件。当前包含 GIF 动画资源 `:app` 模块原始资产文件目录。当前为空2026-06 清理后)
## Key Files ## Key Files
顶层文件
## Subdirectories ## Subdirectories
| Directory | Purpose | 无(原 `gifs/` 子目录的镜像说明已删除 —— 实际 UI/WebP 资源只在 `:core`
|-----------|---------|
| `gifs/` | GIF 动画资源(见 `gifs/AGENTS.md` |
## For AI Agents ## For AI Agents
### Working In This Directory ### Working In This Directory
- 新增原始资源文件直接放入此目录或其子目录 - 历史上此目录曾放 `app_icon.png`/`app_icon_original.png` 作图标源,因无代码引用已于 2026-06 删除
- 通过 `AssetManager` 在运行时访问 - 应用内图标用 `core/src/main/assets/app_icon.webp``Platform.kt`
- 启动器图标用 `app/src/main/res/mipmap-*/`(含 Adaptive Icon
- **不要再把图标源 PNG 放这里**:会被打进 APK。源文件放仓库外或 `.assets-source/`
<!-- MANUAL: --> <!-- MANUAL: -->

View File

@ -1,33 +0,0 @@
<!-- Parent: ../AGENTS.md -->
<!-- Generated: 2026-05-22 | Updated: 2026-05-22 -->
# gifs
## Purpose
GIF 动画资源目录,存放应用使用的动画 GIF 文件001.gif ~ 152.gif`AnimatedGif` Composable 组件通过 `sketch` 库加载显示。
## Key Files
| File | Description |
|------|-------------|
| `001.gif` ~ `152.gif` | 应用动画 GIF 资源 |
## Subdirectories
## For AI Agents
### Working In This Directory
- 替换或新增 GIF 时保持连续编号
- GIF 文件较大,注意 APK 体积影响
- `AnimatedGif` 组件使用 `sketch` 库异步加载和播放
## Dependencies
### Internal
- `core/src/main/kotlin/plus/rua/project/ui/AnimatedGif.kt` — GIF 显示组件
### External
- `sketch` 4.4.0GIF 解码和播放)
<!-- MANUAL: -->

View File

@ -1,25 +1,28 @@
<!-- Parent: ../AGENTS.md --> <!-- Parent: ../AGENTS.md -->
<!-- Generated: 2026-05-22 | Updated: 2026-05-22 --> <!-- Generated: 2026-05-22 | Updated: 2026-06-15 -->
# assets # assets
## Purpose ## Purpose
核心模块原始资产文件目录,`app/src/main/assets/` 镜像,包含 GIF 动画资源供 `AnimatedGif` Composable 组件加载 核心模块原始资产文件目录,通过 `AssetManager` 在运行时访问。包含应用内图标和动画 WebP 资源
## Key Files ## Key Files
无顶层文件 | File | Description |
|------|-------------|
| `app_icon.webp` | 应用内展示用的图标(`Platform.kt``getAppIconUri()` 引用) |
## Subdirectories ## Subdirectories
| Directory | Purpose | | Directory | Purpose |
|-----------|---------| |-----------|---------|
| `gifs/` | GIF 动画资源(见 `gifs/AGENTS.md` | | `animations/` | 动画 WebP 资源(见 `animations/AGENTS.md` |
## For AI Agents ## For AI Agents
### Working In This Directory ### Working In This Directory
- 此目录与 `app/src/main/assets/` 内容同步 - 新增原始资源文件直接放入此目录或其子目录
- 通过 `AssetManager` 在运行时访问 - **不与 `app/src/main/assets/` 镜像**:启动器图标在 `:app`UI/WebP 资源在 `:core`
- 通过 `file:///android_asset/<path>` URI 在运行时访问
<!-- MANUAL: --> <!-- MANUAL: -->

View File

@ -1,16 +1,18 @@
<!-- Parent: ../AGENTS.md --> <!-- Parent: ../AGENTS.md -->
<!-- Generated: 2026-05-22 | Updated: 2026-05-22 --> <!-- Generated: 2026-05-22 | Updated: 2026-06-15 -->
# gifs # animations
## Purpose ## Purpose
GIF 动画资源目录,存放应用使用的动画 GIF 文件001.gif ~ 152.gif`AnimatedGif` Composable 组件通过 `sketch` 库加载显示。 动画 WebP 资源目录,存放应用日历切换时随机展示的动画(文件名 `001.webp` ~ `NNN.webp`,由构建期扫描生成)。由 `AnimatedWebp` Composable 通过 `sketch` 库加载。
> 历史命名曾为 `gifs/`2026-06 前),实际格式一直是 WebP 动画,现已正名。
## Key Files ## Key Files
| File | Description | | File | Description |
|------|-------------| |------|-------------|
| `001.gif` ~ `152.gif` | 应用动画 GIF 资源 | | `001.webp` ~ `NNN.webp` | 动画 WebP 资源,编号零填充三位 |
## Subdirectories ## Subdirectories
@ -18,16 +20,18 @@ GIF 动画资源目录,存放应用使用的动画 GIF 文件001.gif ~ 152.
## For AI Agents ## For AI Agents
### Working In This Directory ### Working In This Directory
- 替换或新增 GIF 时保持连续编号 - 替换或新增 WebP 时保持连续三位编号(如 `153.webp`
- GIF 文件较大,注意 APK 体积影响 - **无需手动更新列表**`core/build.gradle.kts` 在构建期扫描本目录生成 `BuildConfig.WEBP_FILES`
- `AnimatedGif` 组件使用 `sketch` 库异步加载和播放 - 由 `AnimatedWebpFilesTest` 守卫目录与列表一致
- WebP 文件较大,注意 APK 体积
## Dependencies ## Dependencies
### Internal ### Internal
- `core/src/main/kotlin/plus/rua/project/ui/AnimatedGif.kt` — GIF 显示组件 - `core/src/main/kotlin/plus/rua/project/ui/AnimatedWebp.kt` — WebP 显示组件
- `core/build.gradle.kts` — 构建期扫描注入 `BuildConfig.WEBP_FILES`
### External ### External
- `sketch` 4.4.0GIF 解码和播放) - `sketch` 4.4.0`sketch-animated-webp`,动画 WebP 解码播放)
<!-- MANUAL: --> <!-- MANUAL: -->