Compare commits
15 Commits
68953c4e35
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| b2820ec024 | |||
| 2cf8a5e9ce | |||
| 077d20c7e2 | |||
| c85498369d | |||
| f256e7113a | |||
| 010fb4d1cf | |||
| ccfddadf2a | |||
| d582d69595 | |||
| e8b9da5bc3 | |||
| 996ddf3c67 | |||
| 1a9f5a5b0c | |||
| 830128d812 | |||
| a37dfa505a | |||
| 6319ab331a | |||
| 8274df2de1 |
@@ -0,0 +1,74 @@
|
||||
---
|
||||
name: "floorplan-recognizer"
|
||||
description: >
|
||||
户型图识别工具。当需要"识别户型图"、"解析户型"、"提取户型信息"、"看户型有哪些房间/窗户"、
|
||||
"floor plan recognition"、"户型图推导输入"时使用。用 qwen-vl-max 把链家等房产户型图解析成
|
||||
结构化 JSON(房间/朝向/窗户形态),并生成「路径 B 文字钉死」片段,作为居民楼立面推导的可靠输入。
|
||||
---
|
||||
|
||||
# 户型图识别工具 (Floorplan Recognizer)
|
||||
|
||||
> 户型图图片 → qwen-vl-max 解析 → 结构化 JSON + 「路径 B 文字钉死」片段
|
||||
|
||||
## 为什么需要它
|
||||
|
||||
AI 生图模型(GPT-Image-2)独立读户型图不可靠——会用"住宅常识"脑补(默认卧室大窗、阳台落地窗、漏房间),
|
||||
导致路径 B「户型图推导」每张图都要**人工逐项校验窗户形态与比例**(见 `docs/art/美术风格指南.md` 路径 B 劣势)。
|
||||
|
||||
本工具先用专门的视觉大模型 qwen-vl-max 把户型图**解析成结构化清单**,把"人工逐项校验"降级为
|
||||
"AI 出清单 + 人工快速核对"。
|
||||
|
||||
> 评测结论(详见 `ai-art-research/生成结果/户型图识别评测/评测对比.md`):qwen-vl-max 在房间完整性、
|
||||
> 面积 OCR 精度、备注诚实度上领先 gpt-4o / qwen-vl-plus / gpt-4o-mini。
|
||||
|
||||
## 触发条件
|
||||
|
||||
- 用户说"识别/解析这张户型图"、"提取户型信息"、"看看这个户型有哪些房间/窗户"
|
||||
- 路径 B 户型图推导前,需要可靠的「房间 + 窗户形态」清单作为"文字钉死"依据
|
||||
- 用户提供了一张链家/房产户型图要求分析
|
||||
|
||||
## 工具位置
|
||||
|
||||
```
|
||||
ai-art-research/tools/
|
||||
floorplan_parse.py # 生产版(固定 qwen-vl-max,生成文字钉死片段)⭐ 本技能用这个
|
||||
floorplan_eval.py # 评测版(可换模型对比)
|
||||
```
|
||||
|
||||
依赖 `ai-art-research/.env` 的 `APIYI_API_KEY`(与 `image_gen.py` 共用)。
|
||||
|
||||
## 工作流
|
||||
|
||||
### 步骤 1:解析户型图
|
||||
|
||||
```bash
|
||||
cd ai-art-research
|
||||
python tools/floorplan_parse.py --image <户型图路径>
|
||||
```
|
||||
|
||||
产出(存 `生成结果/户型图识别/`):
|
||||
- `<时间戳>_apiyi_qwen-vl-max.json` — 结构化结果(房间/朝向/窗户/立面对应表)
|
||||
- `<时间戳>_apiyi_qwen-vl-max.钉死.md` — 「路径 B 文字钉死」片段(可直接粘进生图 prompt)
|
||||
- `.meta.json` — 调用元数据
|
||||
|
||||
### 步骤 2:人工快速核对
|
||||
|
||||
对照原图,重点核对「文字钉死」片段里的 ⚠️ 核对项(这些是评测发现的脑补重灾区):
|
||||
- **卫生间朝向 / 是否暗卫**(模型间分歧最大)
|
||||
- **阳台朝向**(皆南 vs 一南一北类分歧)
|
||||
- **窗户类型 / 大小**(均为推测值)
|
||||
|
||||
房间数量与单间面积经评测高度可信(qwen-vl-max 与 gpt-4o 面积 OCR 完全一致),一般无需核对。
|
||||
|
||||
### 步骤 3:喂给路径 B 生图
|
||||
|
||||
把核对后的「文字钉死」片段贴进 `ai-art-research/prompts/居民楼-*-户型图推导-v*.txt` 的窗户形态段落,
|
||||
作为户型图推导立面的"文字钉死"依据,再走 `image_gen.py --fuse` 生图。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 走 API易 的 **vision chat 接口(按 token 计费)**,与生图通道(codex 按订阅 / apiyi 按张)独立,互不影响
|
||||
- 窗户类型/朝向/大小是模型**推测**,务必核对;房间结构与面积可信
|
||||
- 若某张图效果不稳,可用 `floorplan_eval.py --image <图> -m <模型>` 换模型对比(参考评测对比.md)
|
||||
- 链家等彩色标准化户型图适配良好;纯手绘/模糊扫描图效果会下降
|
||||
- `ai-art-research/` 被项目 `.ignore` 屏蔽,操作需用显式路径(不进 Glob 检索)
|
||||
@@ -0,0 +1,134 @@
|
||||
---
|
||||
name: "problem-solving"
|
||||
description: "问题解决技能 — 改 bug / 排查复杂问题时,按「问题分析 → 工作记录 → 知识沉淀」三段式产出。当需要「修 bug」「排查问题」「调查原因」「问题分析」「写工作记录」「沉淀知识库」时使用。"
|
||||
---
|
||||
|
||||
# 问题解决(Problem Solving)
|
||||
|
||||
> 改 bug / 做复杂改动时,按「问题分析 → 工作记录 → 知识沉淀」三段式产出。
|
||||
> **核心范式**:Gitea issue 是工作台(承载问题分析 + 工作记录,事务性);`docs/knowledge/` 是精选集(只收值得长期保留的坑);临时代码验证完即删。
|
||||
|
||||
## 触发条件
|
||||
|
||||
- 用户要求**修 bug、排查问题、调查根因**,且问题非一行 typo 类简单修改
|
||||
- 用户说「修 bug」「排查」「为什么…」「调查」「这个问题怎么回事」等
|
||||
- 改动涉及多个文件 / 需要先理解现状才能动手的复杂改动
|
||||
|
||||
**不触发**(直接改 + 普通 `fix(scope)` 提交):明显的单行修复、typo、数值微调。
|
||||
|
||||
---
|
||||
|
||||
## 九步流程
|
||||
|
||||
### 1. 判断复杂度
|
||||
|
||||
简单修复(单行、明显错误)→ 直接改 + `fix(scope)` 提交,**不走本流程**。
|
||||
复杂问题(需调查、跨文件、根因不明)→ 继续后续步骤。
|
||||
|
||||
### 2. 开 / 关联 Gitea issue
|
||||
|
||||
调用 `gitea-pm` / `gitea-collab` skill:
|
||||
- 没有对应 issue → 开一个,打标签 `type:bug`(缺陷修复)或 `type:investigation`(纯调查)+ `status:in-progress`
|
||||
- 已有 issue → 关联,更新为 `status:in-progress`
|
||||
|
||||
> 每个「要解决的问题」都应有对应 issue——问题分析和工作记录都挂在它上面。
|
||||
|
||||
### 3. 问题分析(写入 issue 描述 / 首条评论)
|
||||
|
||||
按「问题分析模板」填写:现象 / 复现 / 影响范围 / 假设与验证 / 初步结论。这是调查过程的留痕。
|
||||
|
||||
### 4. 本地调查
|
||||
|
||||
写临时验证代码验证假设(文件名前缀 `tmp_` / `dev_`,文件头 `// [TEMP-INVESTIGATE: issue#XX] 验证后删除`)。**关键验证代码片段**以代码块形式记入 issue「假设与验证」章节。
|
||||
|
||||
### 5. 清理临时代码
|
||||
|
||||
验证完**即删**——删除 `tmp_`/`dev_` 文件、`git revert` 或删除 `[TEMP-INVESTIGATE]` 的 commit。最后 `grep -r "TEMP-INVESTIGATE" Source/ tools/` 确认无残留。
|
||||
|
||||
> 原则:删除的是可运行 artifact,保留的是 insight(结论 + 片段已写入 issue)。
|
||||
|
||||
### 6. 修复
|
||||
|
||||
写正式代码 / 蓝图,遵循 `code-implementation` skill 规范 + Git 规范(`fix(scope)`,C++ 与蓝图分开提交,见 `docs/common/GIT-GUIDE.md`)。
|
||||
|
||||
### 7. 工作记录(写入 issue 关闭总结评论)
|
||||
|
||||
按「修复总结模板」发一条评论:问题 / 根因 / 解决方案 / 验证 / 影响范围 / 是否沉淀知识库。
|
||||
|
||||
> **与 deviation-report 的分工**:问题涉及「实现 vs 执行案偏差」时(有执行案对照)→ 用 `deviation-report` skill 写偏差报告;纯 bug 修复(无执行案对照)→ 用本「修复总结」。两者互补。
|
||||
|
||||
### 8. 知识库评估
|
||||
|
||||
判断这个坑是否值得长期保留(**任一为是**即提炼):
|
||||
- 会复发吗?(换人/换系统会再踩)
|
||||
- 根因非显而易见吗?(光看代码看不出来)
|
||||
- 当前是临时方案吗?
|
||||
|
||||
**是** → 提炼一条进 `docs/knowledge/` 对应主题文件(`坑-<主题>.md`),更新 `docs/knowledge/INDEX.md`;若是临时方案,再登记到 `docs/knowledge/临时方案登记.md`。
|
||||
**否** → issue 关闭即可,不必沉淀。
|
||||
|
||||
> 动手前先读 `docs/knowledge/INDEX.md`,看有没有相关坑可避让。
|
||||
|
||||
### 9. 关闭 issue
|
||||
|
||||
更新 issue 为 `status:done`,在评论里记录产出位置(分析评论 / 修复总结评论 / 知识库条目路径)。
|
||||
|
||||
---
|
||||
|
||||
## 模板
|
||||
|
||||
### 问题分析模板(issue 描述 / 首条评论)
|
||||
|
||||
```markdown
|
||||
## 问题现象
|
||||
## 复现步骤
|
||||
## 影响范围
|
||||
## 假设与验证(调查过程)
|
||||
- 假设1:… → 验证手段:… → 结论:…
|
||||
- 假设2:…
|
||||
## 初步结论 / 根因
|
||||
## 关键验证代码片段(临时代码已删,仅留片段)
|
||||
```
|
||||
|
||||
### 修复总结模板(issue 关闭总结评论)
|
||||
|
||||
```markdown
|
||||
## 修复总结
|
||||
### 问题(一句话)
|
||||
### 根因
|
||||
### 解决方案(改了哪些 文件/蓝图/C++,分条)
|
||||
### 验证(怎么确认修好)
|
||||
### 影响范围(是否波及其他系统)
|
||||
### 是否沉淀知识库?(是→已提炼到 docs/knowledge/xxx;否→为何不必)
|
||||
```
|
||||
|
||||
### 知识条目模板(`docs/knowledge/坑-<主题>.md`)
|
||||
|
||||
```markdown
|
||||
### [K-XXX] 标题
|
||||
- 来源: Gitea issue #XX
|
||||
- 症状: …
|
||||
- 根因: …
|
||||
- 避坑做法: …(核心价值)
|
||||
- 状态: ✅正式方案 / ⚠️临时方案(预计转正时机:…)
|
||||
- 关联: [[系统-技术方案]]、相关代码位置 file:line
|
||||
```
|
||||
|
||||
ID 全库统一递增(K-001、K-002…),不分主题。新增后同步更新 `INDEX.md`。详见 `docs/knowledge/README.md`。
|
||||
|
||||
---
|
||||
|
||||
## 产出物清单(每次复杂问题必须交付)
|
||||
|
||||
1. ✅ issue 问题分析(描述 / 首条评论)
|
||||
2. ✅ issue 关闭总结评论(修复总结)
|
||||
3. ⚙️〔条件〕`docs/knowledge/` 知识条目 + `INDEX.md` 更新(仅当值得沉淀)
|
||||
4. ✅ 临时代码已清理(`grep TEMP-INVESTIGATE` 无残留)
|
||||
|
||||
---
|
||||
|
||||
## 核心原则
|
||||
|
||||
- **issue 是工作台,知识库是精选集**:别把过程流水账灌进 docs,只提炼有长期价值的。
|
||||
- **临时代码验证完即删**:仓库只留正式实现,结论和片段留在 issue。
|
||||
- **诚实记录根因**:工作记录的价值在于「为什么」,不在于「我改了什么」——后者看 commit 就知道。
|
||||
+10
@@ -125,3 +125,13 @@ ai-art-research/.env
|
||||
*.swo
|
||||
*~
|
||||
temp.txt
|
||||
|
||||
# ==============================
|
||||
# AI 生图 — codex 运行残留(codex exec -o 输出,每次覆盖,不入库)
|
||||
# ==============================
|
||||
ai-art-research/.codex_lastmsg.txt
|
||||
|
||||
# ==============================
|
||||
# 外部规范/国标参考 PDF(本地保留,不进版本库)
|
||||
# ==============================
|
||||
ai-art-research/*.pdf
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
- **工具**: Gitea(Issues + Milestones)
|
||||
- **进度查询**: Pipeline Tracker(Meta Issue,仅记录当前阶段和阶段历史)
|
||||
- **配置文件**: `.claude/skills/gitea-pm/gitea-config.json`(含连接信息、Token、角色映射、标签定义)
|
||||
- **问题管理**: 改 bug / 排查复杂问题走 `problem-solving` skill(问题分析 + 工作记录挂 Gitea issue,经验沉淀进 `docs/knowledge/`);详见 [`docs/knowledge/README.md`](docs/knowledge/README.md)
|
||||
|
||||
---
|
||||
|
||||
@@ -30,3 +31,13 @@
|
||||
- 分支: `develop/`
|
||||
- 提交: `<type>(<scope>): <中文描述>`,subject ≤ 50 字符
|
||||
- UE5: 蓝图与 C++ 分开提交;.uasset/.umap commit message 必须写清内容
|
||||
|
||||
---
|
||||
|
||||
## AI 生图
|
||||
|
||||
- **默认走 Codex 通道**(ChatGPT Plus 订阅额度,不按张计费),完整流程见 [`ai-art-research/codex生图工作规范.md`](ai-art-research/codex生图工作规范.md)。该通道为**协作模式**:`codex exec` 由**用户在终端执行**,Claude 负责组装 prompt 与捞图/命名/写 meta 收尾——Claude Code 的安全分类器会硬拦 `codex exec --dangerously-bypass-approvals-and-sandbox`(“Create Unsafe Agents”,不可配置放行),无法自动跑。
|
||||
- **apiyi 兜底**(`tools/image_gen.py`,按张计费):撞 ~40–50 张/3h 限额 / 需真透明背景 / 需 Claude 全自动批量时使用;这条通道 Claude 可全自动跑。
|
||||
- **必须复用现有资产**:`ai-art-research/prompts/*.txt`、`tools/image_gen.py` 的 `STYLE_SEED_EN` 风格种子、`生成结果/` 命名规则(`<时间戳>_gpt-image-2_<模式>.png` + 同名 `.meta.json`,新增 `backend: codex|apiyi` 字段)。
|
||||
- codex 不在默认 PATH,执行路径:`~/.codex/packages/standalone/current/bin/codex.exe`(命令模板:`codex exec --enable image_generation --dangerously-bypass-approvals-and-sandbox -C ai-art-research -o <lastmsg> "<prompt>"`,prompt 内须明示“用内置 image_gen 工具、不要写脚本/不要用 API key”)。
|
||||
- ⚠️ `ai-art-research/` 被项目 `.ignore` 屏蔽,不进 ripgrep/Glob 检索;操作需用显式路径。
|
||||
|
||||
@@ -37,6 +37,13 @@
|
||||
"TargetAllowList": [
|
||||
"Editor"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "Tripo3DUEBridge",
|
||||
"Enabled": true,
|
||||
"SupportedTargetPlatforms": [
|
||||
"Win64"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user