chore: improve Claude Code config and docs#2585
Conversation
|
Visual regression report✅ No changes.
Baselines come from the |
a842707 to
05d09a8
Compare
| ## Finding component info | ||
|
|
||
| ## Quick Start | ||
| 1. **Start with the component README**: `/packages/<pkg>/src/<Component>/README.md` — this is the source for the published docs and has examples + prop descriptions. |
There was a problem hiding this comment.
I would add a sentence about multi version support explaining what v1 v2 means for example.
There was a problem hiding this comment.
Good call — added a short "Component versioning (v1/v2)" section explaining v1 = legacy, v2 = preferred. Thanks! 🙏
| InstUI uses custom markdown with special code blocks (using [gray-matter](https://github.com/jonschlinkert/gray-matter) YAML syntax) for interactive examples. | ||
|
|
||
| **Code block types:** | ||
|
|
There was a problem hiding this comment.
I would keep this info so Claude understands the docs structure.
There was a problem hiding this comment.
Fair — inlined a brief summary of the code/embed/example block types right in CLAUDE.md (kept the link to writing-docs.md for the full reference). Thanks!
| - **scope**: full package name (`ui-button`, `ui-select`). Comma-separate for a few, use `many` for several, omit for repo-wide. | ||
| - **subject**: imperative ("add loading state", not "added"). No trailing period. | ||
| - **Body lines: hard-wrap at 100 characters.** Commitlint (`body-max-line-length: 100`) runs in CI and will reject longer lines. The footer lines (Claude Code attribution, Co-Authored-By) are exempt. | ||
| - **Breaking changes**: add `!` after scope (`feat(ui-select)!: ...`) and a `BREAKING CHANGE:` line in the body. See CLAUDE.md for what counts as breaking. |
There was a problem hiding this comment.
"add ! after scope" -- I've never seen this, why is this needed?
There was a problem hiding this comment.
Good catch — you're right, the repo uses BREAKING CHANGE: in the body, not the ! marker. Dropped it.
| ## Commit Footer | ||
|
|
||
| Always include: | ||
| - **type**: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`. |
There was a problem hiding this comment.
I think the type can have these values: https://www.npmjs.com/package/@commitlint/config-conventional
I'm OK with using less of these, the important thing is to use the feat, fix and all others properly
There was a problem hiding this comment.
Agreed — expanded to the full @commitlint/config-conventional set (added perf, build, ci, revert) and linked it as the source of truth.
| - <only manual / non-CI checks a reviewer should do> | ||
|
|
||
| Fixes INST-XXXX (or omit this section if not applicable) | ||
| Fixes INST-XXXX |
There was a problem hiding this comment.
Fixed — INST → INSTUI (matches the CHANGELOG refs). Thanks!
- Rewrite CLAUDE.md as a minimal, non-derivable reference (~45 lines, down from 200+). - Tighten /commit and /pr slash commands: pin gh to --body-file -, drop CI-covered items from test plan, note commitlint's 100-char body line limit. - Add .claude/settings.json with a read-only safe-command allowlist (git/pnpm/gh/file-search). - Ignore CLAUDE.local.md for personal overrides. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
05d09a8 to
d3d60a6
Compare
Summary
CLAUDE.mdas a minimal, non-derivable reference (~45 lines, from 200+); drop dead path topackages/__docs__/src/components.tsand content Claude can infer from the code./commitand/prslash commands: pinghto--body-file -, exclude CI-covered items from the test plan, drop duplicated breaking-change rules..claude/settings.jsonwith a read-only/safe-command allowlist so commonpnpm/git/gh/file-search commands stop prompting.CLAUDE.local.mdso devs can keep personal overrides uncommitted.Test Plan
Fixes INSTUI-5060
🤖 Generated with Claude Code