Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .claude/skills/bhom-branch-naming/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: BHoM Branch Naming Skill Changelog
description: Version history for all files in the bhom-branch-naming skill folder
version: 0.1.1
author: BHoM
tags: [BHoM, git, changelog]
---

# Changelog - BHoM Branch Naming Skill

## Change History

### 2026-11-19 (Latest)
**Files modified**:
- SKILL.md (v0.1.0 → v0.1.1)
- CHANGELOG.md (v0.1.0 → v0.1.1)

**Changes:**
- Frontmatter `author` set to `BHoM`.

**Rationale:**
PR #265 review feedback.

---

### 2026-11-18
**Files created**:
- SKILL.md (v0.1.0)
- CHANGELOG.md (v0.1.0)

**Changes:**
- Initial draft: `<Project>-#<IssueNumber>-<PascalCaseDescription>` format, project-of-the-issue prefix, paired-change naming, no-issue handling, rename steps, checklist.

**Rationale:**
Claude created `Python_Toolkit-bhom-python-claude-skill` with no issue number. The convention is taken from branch names on the Python_Toolkit, BHoM, BHoM_Engine and LadybugTools_Toolkit remotes.

---
128 changes: 128 additions & 0 deletions .claude/skills/bhom-branch-naming/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
---
name: bhom-branch-naming
description: Name git branches for BHoM repositories as <Project>-#<IssueNumber>-<PascalCaseDescription>. Use whenever creating, renaming or reviewing a branch in any BHoM or BHoM toolkit repo - including before committing on develop/main - and when a task has no issue number yet.
version: 0.1.1
author: BHoM
tags: [BHoM, git, branches, workflow]
---

# BHoM Branch Naming Skill

## Role

You create and check git branch names in BHoM repositories so every branch traces back to the issue it addresses.

## Usage Guide

1. Never commit directly to `develop` or `main` - create a branch first.
2. Find the **issue** the work addresses and the **project** that issue belongs to.
3. Build the name with the [format](#format) below.
4. If there is no issue, [stop and ask](#no-issue-yet) - do not invent one or leave it out.
5. Check the name against the [checklist](#checklist) before creating the branch.

---

## Format

```
<Project>-#<IssueNumber>-<PascalCaseDescription>
```

| Part | Rule | Example |
|------|------|---------|
| `<Project>` | Name of the repository (or project) **where the issue lives**, exactly as GitHub spells it | `Python_Toolkit`, `Structure_Engine`, `Grasshopper_UI` |
| `-#` | Literal hyphen then hash | `-#` |
| `<IssueNumber>` | The GitHub issue number in that project | `257` |
| `-<Description>` | Short PascalCase summary, a few words, no spaces | `ReviewOldTests` |

Examples from BHoM remotes:

```
Python_Toolkit-#253-UV_environment_management
Python_Toolkit-#228-CaptureToolkitName
Structure_Engine-#3642-Extend-IsValid-for-ICase (in the BHoM_Engine repo)
Classification_oM-#1762-AddRICSCategory (same name in BHoM and BHoM_Engine for a paired change)
Grasshopper_UI-#740-bhom-sample-scripts (in a toolkit repo, for an issue raised on Grasshopper_UI)
```

### The prefix is the issue's project, not always the repo

- In multi-project repos (BHoM, BHoM_Engine), use the project: `Structure_oM-#...`, `Serialiser_Engine-#...`.
- For an issue in another repo, use that repo's name and issue number, even on a branch in this repo (`Grasshopper_UI-#740-...` on a toolkit).
- **Paired changes** across repos (e.g. oM + Engine, or C# + Python) use the **same branch name in every repo**, so CI and reviewers can pair them.

### Description

- PascalCase, describing the change: `AddSpaceCalcMethods`, `FixSunriseSunset`.
- Hyphens or underscores inside the description appear in existing branches and are tolerated; **for new branches, prefer PascalCase**.
- Keep it short (about 2-5 words).

---

## No Issue Yet

A branch without an issue number breaks the convention (e.g. `Python_Toolkit-bhom-python-claude-skill`). When there is no issue:

1. **Ask the user** for the issue number, or whether to open one.
2. Opening an issue publishes content to GitHub: draft the title and body and **get explicit approval** before creating it.
3. Do not use `#XX`, `#0`, or a guessed number as a placeholder, and do not leave the number out.

---

## Not Allowed

| Wrong | Why | Right |
|-------|-----|-------|
| `Python_Toolkit-bhom-python-claude-skill` | No issue number | `Python_Toolkit-#270-AddBHoMPythonClaudeSkill` |
| `Python_Toolkit_#207-tkinter-ui-patches` | `_` before `#` | `Python_Toolkit-#207-TkinterUIPatches` |
| `Python_Toolkit-#XX-EnsureDirectoriesExist` | Placeholder number | Real issue number |
| `BHoM=#1570-DocumentationUpdates` | `=` instead of `-` | `BHoM-#1570-DocumentationUpdates` |
| `feature/add-thing`, `fix-bug`, `combined-branch` | Not the BHoM format | `<Project>-#<n>-AddThing` |
| Committing on `develop` / `main` | Protected integration branches | Branch first |

Automated branches (`dependabot/...`, `copilot/...`) are created by tools and are exempt.

(`#270` above is illustrative only.)

---

## Renaming a Branch

Local only (not pushed yet):

```bash
git branch -m <old-name> <Project>-#<n>-<Description>
```

If already pushed, rename locally, push the new name, then delete the old remote branch **only with the user's approval** (it may have an open PR or other users):

```bash
git push -u origin <new-name>
git push origin --delete <old-name>
```

An open PR does not follow a renamed branch - it must be reopened from the new branch.

---

## Checklist

- [ ] Not on `develop` / `main`
- [ ] Format `<Project>-#<IssueNumber>-<Description>`
- [ ] `<Project>` is where the issue lives, spelled exactly
- [ ] Real issue number (no placeholder)
- [ ] PascalCase description, a few words
- [ ] Same name in every repo of a paired change

---

## Related Skills

- [bhom-develop](../bhom-develop/SKILL.md) - overall development workflow; branch creation happens at the start of implementation.
- [bhom-python](../bhom-python/SKILL.md) - Python work in Python_Toolkit.

---

## Version History

**See [CHANGELOG.md](./CHANGELOG.md) for full version history.**
204 changes: 204 additions & 0 deletions .claude/skills/bhom-python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
---
name: BHoM Python Skill Changelog
description: Version history for all files in the bhom-python skill folder
version: 0.2.10
author: BHoM
tags: [BHoM, Python, changelog]
---

# Changelog - BHoM Python Skill

## Change History

### 2026-11-19 (Latest)
**Files modified**:
- SKILL.md (v0.2.3 → v0.2.4)
- SKILL-FRAMEWORK.md (v0.2.2 → v0.2.3)
- SKILL-IMPLEMENTATION.md (v0.2.7 → v0.2.8)
- SKILL-REVIEW.md (v0.2.5 → v0.2.6)
- SKILL-TESTING.md (v0.2.4 → v0.2.5)
- CHANGELOG.md (v0.2.9 → v0.2.10)

**Files removed**:
- QA-NOTES.md

**Changes:**
- Removed the reviewer-only QA notes; remaining open decisions are tracked in issue #264.
- Frontmatter `author` set to `BHoM` in every file.
- Removed "for QA" wording from the skill text.

**Rationale:**
PR #265 review feedback.

---

### 2026-11-18
**Files modified**:
- SKILL-TESTING.md (v0.2.3 → v0.2.4)
- CHANGELOG.md (v0.2.8 → v0.2.9)

**Changes:**
- "Golden JSON string" renamed to "BHoM JSON string" throughout.

**Rationale:**
PR #265 review feedback.

---

### 2026-11-18
**Files modified**:
- SKILL.md (v0.2.2 → v0.2.3)
- SKILL-IMPLEMENTATION.md (v0.2.6 → v0.2.7)
- SKILL-REVIEW.md (v0.2.4 → v0.2.5)
- SKILL-TESTING.md (v0.2.2 → v0.2.3)
- CHANGELOG.md (v0.2.7 → v0.2.8)
- QA-NOTES.md

**Changes:**
- The BHoM copyright header is now required on every `.py` file, source and tests: new review rule PY-F06 with an automated check, style rule S21, checklist items, and the "Copyright for Python Files" section rewritten from an open decision into the rule.

**Rationale:**
PR #265 review feedback (decision D1).

---

### 2026-11-18
**Files modified**:
- SKILL.md (v0.2.1 → v0.2.2)
- SKILL-REVIEW.md (v0.2.3 → v0.2.4)
- SKILL-TESTING.md (v0.2.1 → v0.2.2)
- CHANGELOG.md (v0.2.6 → v0.2.7)

**Changes:**
- "Happy path" renamed to "success path" throughout.

**Rationale:**
PR #265 review feedback.

---

### 2026-11-18
**Files modified**:
- SKILL.md (v0.2.0 → v0.2.1)
- SKILL-FRAMEWORK.md (v0.2.1 → v0.2.2)
- SKILL-IMPLEMENTATION.md (v0.2.5 → v0.2.6)
- SKILL-REVIEW.md (v0.2.2 → v0.2.3)
- CHANGELOG.md (v0.2.5 → v0.2.6)

**Changes:**
- Methods in `bhom/wrapped/` may modify their inputs (they receive copies deserialised from C# JSON): exception added to PY-C04, the input-mutation guidance, golden rule 7 and the wrapped-method guidance.
- `"test"` wrapped-method defect no longer lists input mutation.

**Rationale:**
PR #265 review feedback.

---

### 2026-11-18
**Files modified**:
- SKILL-IMPLEMENTATION.md (v0.2.4 → v0.2.5)
- SKILL-REVIEW.md (v0.2.1 → v0.2.2)
- CHANGELOG.md (v0.2.4 → v0.2.5)

**Changes:**
- S5 reworded: give sensible defaults where a user would not know what to enter; omit them only for inputs the user must supply; document every default in the docstring.
- PY-D02 now requires default values to be documented.

**Rationale:**
PR #265 review feedback.

---

### 2026-11-18
**Files modified**:
- SKILL-IMPLEMENTATION.md (v0.2.3 → v0.2.4)
- SKILL-REVIEW.md (v0.2.0 → v0.2.1)
- SKILL-TESTING.md (v0.2.0 → v0.2.1)
- CHANGELOG.md (v0.2.3 → v0.2.4)

**Changes:**
- Notebooks are never committed (`*.ipynb` is in `.gitignore`): replaced "clear outputs before commit" guidance, added notebooks to PY-S04 committed artefacts, removed "notebook outputs" from privacy rules.

**Rationale:**
PR #265 review feedback.

---

### 2026-11-18
**Files modified**:
- SKILL-IMPLEMENTATION.md (v0.2.2 → v0.2.3)
- CHANGELOG.md (v0.2.2 → v0.2.3)

**Changes:**
- `jupyterlab` stays a runtime dependency (notebooks must work in non-dev environments); only the pytest packages are proposed for the dev group.

**Rationale:**
PR #265 review feedback.

---

### 2026-11-18
**Files modified**:
- SKILL-IMPLEMENTATION.md (v0.2.1 → v0.2.2)
- CHANGELOG.md (v0.2.1 → v0.2.2)

**Changes:**
- `__init__.py` guidance is no longer a hard "constants and re-exports only" rule: keep them light, with nothing heavy or surprising on import.

**Rationale:**
PR #265 review feedback.

---

### 2026-11-18
**Files modified**:
- SKILL-FRAMEWORK.md (v0.2.0 → v0.2.1)
- SKILL-IMPLEMENTATION.md (v0.2.0 → v0.2.1)
- CHANGELOG.md (v0.2.0 → v0.2.1)
- QA-NOTES.md

**Changes:**
- Console-logger-on-stdout defect: points to the UV environment management update (#253) as the fix, instead of an open question about moving logging to stderr.
- Removed references to defects that are already fixed.

**Rationale:**
PR #265 review feedback.

---

### 2026-11-18
**Files modified**:
- SKILL.md (v0.1.0 → v0.2.0)
- SKILL-IMPLEMENTATION.md (v0.1.0 → v0.2.0)
- SKILL-FRAMEWORK.md (v0.1.0 → v0.2.0)
- SKILL-TESTING.md (v0.1.0 → v0.2.0)
- SKILL-REVIEW.md (v0.1.0 → v0.2.0)
- CHANGELOG.md (v0.1.0 → v0.2.0)
- QA-NOTES.md (rewritten)

**Changes:**
- Scoped to Python_Toolkit only: removed all references to other toolkits; toolkit conventions move to their own skills.
- Made `bhom_wrapper.bhom_callable` + `run_wrapped` the only route from C# into Python: decorator required, decorated methods live in `python_toolkit/bhom/wrapped/`, wrappers stay thin.
- Documented that `bhom_callable` encodes return values to BHoM JSON when called from C#, so methods return objects (strings pass through unencoded).
- Documented the input/output contract as verified in the `Python_Toolkit/v3_10` environment, and the established C# call shape (`run_wrapped.py -command <id> -in <json file>`, whole stdout deserialised, `Traceback` text = failure).
- Added review rules PY-W01 to PY-W08 and test patterns for wrapped methods.
- Updated "Known Framework Defects" to `develop` at `d9d1edd` (#263 fixed the mutable/frozen defaults); added newly verified wrapper defects.
- Removed references to colour scales and palettes, which are not on `develop`.
- Objects with no C# type use `_t = "BH.oM.Base.CustomObject"` (review feedback).

**Rationale:**
Review feedback: C# should always call Python through `run_wrapped`; the draft missed the decorator requirement, the `bhom/wrapped/` location rule, and the automatic BHoM JSON output conversion. Content had to be shareable from the Python_Toolkit repo, which is open source.

---

### 2026-11-18
**Files created**:
- SKILL.md, SKILL-IMPLEMENTATION.md, SKILL-FRAMEWORK.md, SKILL-TESTING.md, SKILL-REVIEW.md, CHANGELOG.md (v0.1.0)

**Changes:**
- Initial cross-toolkit draft for QA.

**Rationale:**
No existing BHoM skill covered Python.

---
Loading
Loading