docs: Archive osmassets refactor plan
This commit is contained in:
@@ -85,7 +85,7 @@ def assemble(ring, [way_id,] scene_xmin, scene_xmax, scene_ymin, scene_ymax,
|
||||
|
||||
### 加一种新 OSM 要素
|
||||
|
||||
目标形态(`docs/refactor-plan.md`):**新增一个模块 + 注册一行,不改 `build()`**。
|
||||
目标形态:**新增一个模块 + 注册一行,不改 `build()`**。
|
||||
|
||||
1. 新建 `osmassets/<feature>.py`,写 `assemble(...)`,签名照抄上面
|
||||
2. 只 import 需要的:`from osmassets.geom import clip_polygon`、
|
||||
@@ -176,7 +176,7 @@ export_cesium.py # 优先读 material custom property
|
||||
否则新生成的 `.blend` 不会自带契约
|
||||
- `catalog.py` 仍属纯 Python 层,不能 import `bpy`;序列化发生在 `materials.py`
|
||||
- `"Office White Metal Facade"` 在四张表里都有,但 `catalog` 里**已无此材质**
|
||||
(`docs/refactor-plan.md` 记为缺陷 D1)。它只能作为旧 `.blend` 回退兼容存在,
|
||||
(历史上记为缺陷 D1)。它只能作为旧 `.blend` 回退兼容存在,
|
||||
不要迁回新契约源
|
||||
|
||||
**改材质名时**:`catalog.MATERIALS` + `catalog.ROAD_LAYERS` + 四张旧回退表全部
|
||||
|
||||
@@ -57,7 +57,7 @@ node scripts/parity.js compare control-1 control-2 # 必须全绿
|
||||
|
||||
没做这步就开始改代码,你会分不清一个差异是"重构引入的 bug"还是"本来就每次都不一样"。
|
||||
|
||||
已完成的 control 结论(`docs/refactor-plan.md`):
|
||||
已完成的 control 结论:
|
||||
|
||||
- `.blend` **结构摘要两次完全一致** ← 这是主校验信号,可信
|
||||
- `.blend` 文件 sha256 不一致
|
||||
@@ -147,7 +147,7 @@ capturedAt / durationMs / label
|
||||
|
||||
## 风险高的改动要分次提交
|
||||
|
||||
`docs/refactor-plan.md` 对风险最高的一期写着:
|
||||
要素注册表这类高风险重构必须按要素分次提交:
|
||||
|
||||
> 逐要素分次提交,每次单独跑 parity。
|
||||
|
||||
@@ -155,9 +155,9 @@ capturedAt / durationMs / label
|
||||
|
||||
---
|
||||
|
||||
## 当前重构进度(`docs/refactor-plan.md`)
|
||||
## 当前重构进度
|
||||
|
||||
那份计划是**临时工作文档**,P3 收尾后会并入 changelog 并删除。当前状态:
|
||||
临时施工计划已删除;长期状态以本指南和 `docs/changelog.md` 为准:
|
||||
|
||||
| 期 | 内容 | 状态 |
|
||||
|---|---|---|
|
||||
|
||||
2
.trellis/tasks/08-03-archive-refactor-plan/check.jsonl
Normal file
2
.trellis/tasks/08-03-archive-refactor-plan/check.jsonl
Normal file
@@ -0,0 +1,2 @@
|
||||
{"file": ".trellis/spec/guides/artifact-parity-guide.md", "reason": "Check that parity/control knowledge survives after deleting the temporary refactor plan."}
|
||||
{"file": ".trellis/spec/guides/index.md", "reason": "Check guide references remain accurate and no stale refactor-plan links remain."}
|
||||
@@ -0,0 +1,2 @@
|
||||
{"file": ".trellis/spec/guides/artifact-parity-guide.md", "reason": "Contains refactor-plan status and references that must be preserved without linking to the deleted temporary file."}
|
||||
{"file": ".trellis/spec/guides/index.md", "reason": "Shared guide routing for cross-layer and parity documentation changes."}
|
||||
35
.trellis/tasks/08-03-archive-refactor-plan/prd.md
Normal file
35
.trellis/tasks/08-03-archive-refactor-plan/prd.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Archive refactor plan
|
||||
|
||||
**类型**:docs · **范围**:docs/spec · **创建**:2026-08-03
|
||||
|
||||
---
|
||||
|
||||
## Goal
|
||||
|
||||
收尾临时文档 `docs/refactor-plan.md`:把仍有价值的 P0-P3 重构结论并入长期文档,
|
||||
然后删除这份已过期的临时计划,避免后续 AI 或开发者读到 P3 未做、旧行号、旧 `CESIUM_EXPORT`
|
||||
状态等过期事实。
|
||||
|
||||
## Requirements
|
||||
|
||||
1. `docs/changelog.md` 必须新增一条 2026-08-03 记录,总结材质导出契约化、Trellis
|
||||
spec 初始化,以及 `docs/refactor-plan.md` 的收尾处理。
|
||||
2. 删除 `docs/refactor-plan.md`,因为它开头已声明 P3 收尾后应并入 changelog 并删除。
|
||||
3. 更新 `.trellis/spec/guides/artifact-parity-guide.md` 中对 `docs/refactor-plan.md` 的
|
||||
直接依赖,保留 parity/control 结论和 P0-P3 当前状态,但不引用已删除文件。
|
||||
4. 不改业务代码,不改 Blender/Cesium 产物,不修 D1-D3。
|
||||
5. 删除后不得留下指向 `docs/refactor-plan.md` 的断链引用。
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] `docs/refactor-plan.md` 不存在。
|
||||
- [ ] `docs/changelog.md` 顶部有 2026-08-03 条目,记录 P3 完成和临时计划归档。
|
||||
- [ ] `rg "docs/refactor-plan.md|refactor-plan" docs .trellis/spec README.md` 不再发现活文档引用。
|
||||
- [ ] `git diff --check` 通过。
|
||||
- [ ] 工作范围只包含 docs、`.trellis/spec` 和当前 Trellis task 文件。
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- P2 要素注册表补完。
|
||||
- D1/D2/D3 修复。
|
||||
- 任何 `blender/`、`scripts/`、`config/` 业务代码改动。
|
||||
30
.trellis/tasks/08-03-archive-refactor-plan/task.json
Normal file
30
.trellis/tasks/08-03-archive-refactor-plan/task.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"id": "archive-refactor-plan",
|
||||
"name": "archive-refactor-plan",
|
||||
"title": "Archive refactor plan",
|
||||
"description": "Move completed osmassets refactor-plan conclusions into changelog and remove the stale temporary plan.",
|
||||
"status": "in_progress",
|
||||
"dev_type": "docs",
|
||||
"scope": "docs/spec",
|
||||
"package": null,
|
||||
"priority": "P2",
|
||||
"creator": "dingkang",
|
||||
"assignee": "dingkang",
|
||||
"createdAt": "2026-08-03",
|
||||
"completedAt": null,
|
||||
"branch": null,
|
||||
"base_branch": "main",
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": null,
|
||||
"relatedFiles": [
|
||||
"docs/changelog.md",
|
||||
"docs/refactor-plan.md",
|
||||
".trellis/spec/guides/artifact-parity-guide.md"
|
||||
],
|
||||
"notes": "Lightweight docs cleanup. Remove stale temporary refactor plan after merging durable conclusions into changelog/spec.",
|
||||
"meta": {}
|
||||
}
|
||||
Reference in New Issue
Block a user