Skip to content

chore: improve Claude Code config and docs#2585

Open
balzss wants to merge 1 commit into
masterfrom
claude-config-improvements
Open

chore: improve Claude Code config and docs#2585
balzss wants to merge 1 commit into
masterfrom
claude-config-improvements

Conversation

@balzss

@balzss balzss commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Rewrite CLAUDE.md as a minimal, non-derivable reference (~45 lines, from 200+); drop dead path to packages/__docs__/src/components.ts and content Claude can infer from the code.
  • Tighten /commit and /pr slash commands: pin gh to --body-file -, exclude CI-covered items from the test plan, drop duplicated breaking-change rules.
  • Add .claude/settings.json with a read-only/safe-command allowlist so common pnpm/git/gh/file-search commands stop prompting.
  • Ignore CLAUDE.local.md so devs can keep personal overrides uncommitted.

Test Plan

  • No manual verification needed; affects only Claude Code config and contributor docs.

Fixes INSTUI-5060

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2585/

Built to branch gh-pages at 2026-06-11 12:31 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Visual regression report

No changes.

Status Count
Unchanged 32
Changed 0
New 0
Removed 0

📊 View full report

Baselines come from the visual-baselines branch. They refresh on every merge to master.

github-actions Bot pushed a commit that referenced this pull request Jun 9, 2026
@balzss balzss self-assigned this Jun 9, 2026
@balzss balzss force-pushed the claude-config-improvements branch from a842707 to 05d09a8 Compare June 9, 2026 15:09
@balzss balzss requested review from joyenjoyer and matyasf June 10, 2026 08:53
Comment thread CLAUDE.md
## 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a sentence about multi version support explaining what v1 v2 means for example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call — added a short "Component versioning (v1/v2)" section explaining v1 = legacy, v2 = preferred. Thanks! 🙏

Comment thread CLAUDE.md
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:**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep this info so Claude understands the docs structure.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Comment thread .claude/commands/commit.md Outdated
Comment thread .claude/commands/commit.md Outdated
Comment thread .claude/commands/pr.md Outdated
- 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>
@balzss balzss force-pushed the claude-config-improvements branch from 05d09a8 to d3d60a6 Compare June 11, 2026 12:26
@balzss balzss requested review from joyenjoyer and matyasf June 11, 2026 12:48
Comment thread .claude/commands/pr.md

All PRs must include:
1. `git status` — confirm branch + remote tracking.
2. `git log master..HEAD` and `git diff master...HEAD` — review **all** commits in the branch, not just the latest.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should the AI review commits when pushing?

Comment thread .claude/commands/pr.md
## Steps

All PRs must include:
1. `git status` — confirm branch + remote tracking.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also add here, that it should abort if its on the master branch or its in a branch that has no commits.


Co-Authored-By: Claude <noreply@anthropic.com>
```
1. `git status` + `git diff` (and `git diff --staged` if anything's staged).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add that it should not commit if its on the master branch

Comment thread CLAUDE.md
# Instructure UI

## Project Overview
React component library and design system. Lerna 8 + pnpm monorepo, ~100 packages under `/packages/ui-*`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're using Lerna 9 now... I think that the version here is irrelevant

Always include:
- **type**: one of `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`. `commitlint.config.js` extends [`@commitlint/config-conventional`](https://www.npmjs.com/package/@commitlint/config-conventional), which defines the allowed set — pick the type that genuinely matches the change (`feat`/`fix` only for actual features/bug fixes).
- **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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • must start with a lowercase letter.

Comment thread .claude/commands/pr.md
2. **Test Plan**: Clear steps for reviewers to test the changes
3. **Jira Reference**: Include relevant Jira ticket number if applicable (e.g., `Fixes INST-1234`)
4. **AI Disclosure**: Must clearly indicate this was created with AI assistance
If the branch name or any commit references a Jira ticket (e.g. `INSTUI-1234`), include it. If you can't find one, ask the user once before opening — don't invent one.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also write that the JIRA ticket number should be included in the PR title, e.g. INSTUI-1234 Fix Button border sizing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants