README: installation guide for agent CLIs (Claude Code / opencode / Codex)

- Claude Code: clone into ~/.claude/skills (SKILL.md frontmatter already
  Anthropic skill format, auto-discovered/triggered)
- opencode / Codex and other AGENTS.md-based tools: clone anywhere + an
  AGENTS.md pointer (read SKILL.md first, obey DoD gates, run the suite)
- generic fallback preamble for any agent; runtime dependency list

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 11:52:26 +08:00
parent e1bbca3fe7
commit eb7eea2861

View File

@@ -2,6 +2,43 @@
把中国建筑施工图(DWG/DXF,天正 t3/t8 导出为主)自动转成可交互的 3D 展示模型(GLB + 离线单文件 Web viewer),并支持多栋厂区按总平面装配。Agent-led:脚本负责证据与可重复执行,判读权在 Agent;任何门禁失败即停,不静默出错模型。
## 安装到 Agent CLI
`SKILL.md` 自带 frontmatter(`name`/`description`),符合 Anthropic skill 格式;本仓库即 skill 本体,克隆即装。
**Claude Code**(原生 skill 机制,自动发现与触发):
```bash
# 全局(所有项目可用)
git clone ssh://git.latent.chat/zhengweirong/cad-building-showcase.git \
~/.claude/skills/cad-building-showcase
# 或装进单个项目
git clone ... <project>/.claude/skills/cad-building-showcase
```
装好后对 Claude Code 说"把这套 DWG 做成 3D 展示模型"即可自动触发,或显式 `/cad-building-showcase`。
**opencode / Codex CLI / 其他 AGENTS.md 系工具**(无 skill 机制,用指令文件指路):
```bash
git clone ... tools/cad-building-showcase # 克隆到项目内任意位置(或 git submodule)
```
然后在项目的 `AGENTS.md`(opencode、Codex 都读它)加一段:
```markdown
## CAD → 3D 展示模型
处理 DWG/DXF 转 3D/Web 展示任务时,必须先完整阅读
tools/cad-building-showcase/SKILL.md 并遵守其中 One-Shot Definition of Done
七条门禁:门禁失败即停下修复,绝不绕过;改动任何脚本后必须跑
`python3 tools/cad-building-showcase/tests/test_extraction_pipeline.py` 且全绿。
```
**任何其他 Agent 的兜底用法**:把上面那段话作为任务开场白直接粘给它——skill 的全部约定都在 `SKILL.md` 里,脚本自含 CLI(`--help` 可查),不依赖宿主工具的任何私有机制。
**运行依赖**:Python ≥3.10 + `ezdxf`(惯例装到 `pip install --target work/vendor ezdxf`)、`shapely`、`trimesh`、`matplotlib`;Node ≥18(`tools/compress.mjs`、无原生转换器时的 WASM DWG 兜底)。可选:libredwg(`dwg2dxf` 批量转换)、ODA File Converter(坏件/天正大图兜底,脚本自动调用)、Blender(高保真渲染分支)。
## 用法
入口是 `SKILL.md`(操作手册):决策循环、One-Shot Definition of Done 七条门禁、天正图层方言预设、多栋厂区流程。核心链路: