Compare commits

3 Commits
1.0 ... main

Author SHA1 Message Date
081638d479 Update CHANGELOG.md 2026-05-03 14:40:50 +08:00
5e554baced Replace CLAUDE.md with andrej-karpathy-skills template
Adopt the high-star GitHub CLAUDE.md behavioral guidelines:
- Think Before Coding: surface assumptions and tradeoffs
- Simplicity First: minimum code, no speculative additions
- Surgical Changes: touch only what's needed
- Goal-Driven Execution: define verifiable success criteria
2026-05-03 14:40:25 +08:00
f8de37fe1d Update README with installation and usage instructions 2026-05-02 12:38:47 +08:00
3 changed files with 75 additions and 27 deletions

View File

@@ -11,7 +11,6 @@
- 支持 string 类型字段TextBox
- 支持 list 类型字段ComboBox 下拉选择)
- 多 XML 模板支持:可同时加载多个 XML 文件
- 四种导入合并模式:追加、替代、合并更新、智能合并
- `XmlImportDialog`:导入时弹出模式选择对话框
- 模板持久化Rhino 重启后自动恢复已加载的模板
- `TemplateManager`:管理模板生命周期和 index 文件

View File

@@ -1,17 +1,65 @@
> 本文件仅保留高优先级、易混淆、跨会话必须一致的约束。
> 本文件必须极精简,占用大模型注意力视为失效。
# CLAUDE.md
## 项目一句话
Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed.
Rhino 8 C# 插件(.rhp管理 Block 的 UserString 属性,支持 XML 模板导入。
**Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.
## 自动化约定
## 1. Think Before Coding
- 禁止自行 commit / push git用户下达指令再执行
- 完成任务后清理临时文件
**Don't assume. Don't hide confusion. Surface tradeoffs.**
## 文档入口
Before implementing:
- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them - don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.
- PLAN.md待办事项
- CHANGELOG.md版本记录
- CLAUDE.md仅包含本文件不要混入项目说明
## 2. Simplicity First
**Minimum code that solves the problem. Nothing speculative.**
- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
## 3. Surgical Changes
**Touch only what you must. Clean up only your own mess.**
When editing existing code:
- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- If you notice unrelated dead code, mention it - don't delete it.
When your changes create orphans:
- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.
The test: Every changed line should trace directly to the user's request.
## 4. Goal-Driven Execution
**Define success criteria. Loop until verified.**
Transform tasks into verifiable goals:
- "Add validation" → "Write tests for invalid inputs, then make them pass"
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
- "Refactor X" → "Ensure tests pass before and after"
For multi-step tasks, state a brief plan:
```
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]
```
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
---
**These guidelines are working if:** fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.

View File

@@ -11,20 +11,11 @@ Rhino 插件,根据用户自定义 XML 配置,给 Block 实例附加属性
- 模板自动持久化Rhino 重启后自动恢复
- 导入时检测属性集冲突,覆盖或新增
## 安装
## 使用
### 编译
### 安装
```bash
cd UserStringProperty
dotnet build
```
输出:`UserStringProperty/bin/UserStringProperty.dll`
### 加载到 Rhino
1.`bin/UserStringProperty.dll` 重命名为 `UserStringProperty.rhp`
1. 下载发布的rhp文件放置到rhino安装目录下 Rhino 8\Plug-ins
2. Rhino → `Options``Plug-ins``Install` → 选择 `.rhp` 文件
### 使用
@@ -36,14 +27,24 @@ dotnet build
5. 在下拉框中选择属性集,编辑各字段值
6. 点击 **写入属性**
## 模板导入
### 模板导入
加载 XML 时,会弹出对话框让选择 cmig 和属性集,检测同名冲突:
- **同名属性集不存在** → 直接保存为新模板
- **同名属性集已存在** → 需确认是否覆盖
## XML 配置格式
### 编译
```bash
cd UserStringProperty
dotnet build
```
输出:`UserStringProperty/bin/UserStringProperty.dll`
`bin/UserStringProperty.dll` 重命名为 `UserStringProperty.rhp`
## XML 配置
插件根据 XML 动态生成 UI。示例 XML 格式如下:
@@ -78,7 +79,7 @@ dotnet build
属性名的 `default` 值以 `---` 开头时(即 `default="--------------------"`),该属性显示为分组标题栏。
## 模板存储
### 模板存储
已加载的 XML 模板会复制一份保存到插件目录,重启 Rhino 后自动恢复: