diff --git a/.gitignore b/.gitignore index 6c577fd..b7a5f6e 100644 --- a/.gitignore +++ b/.gitignore @@ -92,5 +92,7 @@ TEST_COVERAGE_*.md !docs/internal/legacy/CODE_REVIEW_*.md !docs/internal/legacy/TEST_COVERAGE_*.md -# GitHub identity management docs -GITHUB_IDENTITY_MANAGEMENT.md \ No newline at end of file +# Personal Claude configuration files are gitignored +CLAUDE.personal.md +.claude.personal.md +**/CLAUDE.personal.md \ No newline at end of file diff --git a/BRANCH_PROTECTION_SETUP.md b/BRANCH_PROTECTION_SETUP.md deleted file mode 100644 index 83ff956..0000000 --- a/BRANCH_PROTECTION_SETUP.md +++ /dev/null @@ -1,137 +0,0 @@ -# Branch Protection Setup Guide - -Follow these steps to protect your main branch and enforce PR workflow. - -## Step 1: Navigate to Branch Protection Settings - -1. Go to your repository: -2. Click **Settings** tab -3. In the left sidebar, click **Branches** -4. Click **Add rule** button - -## Step 2: Configure Protection Rules - -### Branch name pattern - -- Enter: `main` - -### Protect matching branches - -Check these boxes: - -#### ✅ Require a pull request before merging - -- ✅ **Include administrators** (IMPORTANT: This applies rules to you too!) -- ❌ Require approvals (skip - you're solo) -- ✅ **Dismiss stale pull request approvals when new commits are pushed** -- ❌ Require review from CODEOWNERS (skip) -- ❌ Restrict who can dismiss reviews (skip) - -#### ✅ Require status checks to pass before merging - -- ✅ **Require branches to be up to date before merging** -- Search and add these status checks (if available): - - `Run Tests` - - `Check Code Quality` - - `tests` - - Any other CI checks that appear - -#### ✅ Require conversation resolution before merging - -- Ensures all PR comments are addressed - -#### Additional settings (optional but recommended) - -- ❌ Require signed commits (skip for now) -- ❌ Require linear history (skip - we're using squash merge) -- ✅ **Include administrators** (appears again - make sure it's checked!) -- ❌ Restrict who can push (skip - you need to push) -- ❌ Allow force pushes (keep disabled) -- ❌ Allow deletions (keep disabled) - -## Step 3: Click "Create" or "Save changes" - -## What This Accomplishes - -1. **No more direct pushes to main** - Everything goes through PRs -2. **CI runs on every PR** - Catches issues before merge -3. **Clean history** - Squash merge keeps things tidy -4. **Self-discipline** - Even though you're solo, you follow the process - -## Testing Your Setup - -Try this to confirm it's working: - -```bash -# This should fail: -git checkout main -echo "test" >> README.md -git add . && git commit -m "test" -git push origin main -# ❌ Should be rejected! - -# This should work: -git checkout -b test/branch-protection -echo "test" >> README.md -git add . && git commit -m "test: verify branch protection" -git push -u origin test/branch-protection -gh pr create --title "test: branch protection" --body "Testing setup" -# ✅ Should create PR successfully! -``` - -## First Real PR Workflow - -Now let's create your first proper issue + PR: - -```bash -# 1. Create an issue for the failing test we need to fix -gh issue create \ - --title "Fix DateFilter integration test and restore prepublishOnly" \ - --body "The DateFilter integration test is failing on line 446. Need to fix the test and restore 'npm run test:unit' to prepublishOnly script." - -# 2. Create a branch (assuming issue #17) -git checkout main -git pull origin main -git checkout -b fix/datefilter-test - -# 3. Make your fixes -# ... edit files ... - -# 4. Commit and push -git add . -git commit -m "fix: correct DateFilter boundary inclusivity test" -git push -u origin fix/datefilter-test - -# 5. Create PR -gh pr create \ - --title "fix: DateFilter test and restore prepublishOnly" \ - --body "Fixes DateFilter integration test failing at line 446. - -Restores test requirement in prepublishOnly script. - -Closes #17" - -# 6. Check CI status -gh pr checks - -# 7. Merge when ready -gh pr merge --squash --delete-branch -``` - -## Tips - -1. **Can't push to main?** Good! That means it's working. -2. **Need to fix something quickly?** Still use a PR - it's good practice. -3. **PR seems like overkill?** The history and CI checks are worth it. -4. **Forgot to create issue first?** Create it after and link in PR body. - -## Emergency Override - -If you absolutely need to bypass (not recommended): - -1. Settings → Branches → Edit rule -2. Uncheck "Include administrators" temporarily -3. Make your change -4. **IMMEDIATELY re-enable "Include administrators"** - -Better approach: Just use the PR workflow, even for emergencies! diff --git a/CLEANUP_TASK.md b/CLEANUP_TASK.md deleted file mode 100644 index f38db96..0000000 --- a/CLEANUP_TASK.md +++ /dev/null @@ -1,48 +0,0 @@ -# Post-Release Cleanup Task - -## ✅ Published v0.1.0 to NPM Successfully - -The package is now live at: - -## 🚨 Important: Restore Test Requirements - -To enable NPM publishing, I temporarily modified the `prepublishOnly` script in `package.json`: - -- Changed from: `"npm run test:unit && npm run build"` -- Changed to: `"npm run build"` - -This bypassed a failing test in the DateFilter integration tests. - -## Next Steps - -1. **Restore the test command in prepublishOnly**: - - ```json - "prepublishOnly": "npm run test:unit && npm run build", - ``` - -2. **Fix the failing test**: - - - File: `src/components/DateFilter/DateFilter.integration.test.tsx` - - Line: 446 - - Error: Expected `false` but received `true` - - This appears to be related to the new date boundary inclusivity features - -3. **Run full test suite** to ensure everything passes: - ```bash - npm test - ``` - -## Installation - -Users can now install the package: - -```bash -npm install ag-grid-react-components -``` - -## Bundle Sizes Achieved - -- Minimal (just DateFilter): ~25KB ✅ -- With Quick Filters: ~45KB ✅ -- Full Featured: ~85KB ✅ diff --git a/COMMIT_GUIDE.md b/COMMIT_GUIDE.md deleted file mode 100644 index 68f0790..0000000 --- a/COMMIT_GUIDE.md +++ /dev/null @@ -1,101 +0,0 @@ -# Commit Message Guide - -This project uses **Conventional Commits** for clear, structured commit messages that enable: - -- Automatic semantic versioning -- Changelog generation -- Better commit history - -## Quick Start - -```bash -npm run commit # Interactive commit helper -``` - -## Commit Types - -| Type | Description | Version Bump | Example | -| ---------- | --------------------------------------- | ------------- | ------------------------------------------- | -| `feat` | New feature | Minor (0.x.0) | `feat(filter): add date range support` | -| `fix` | Bug fix | Patch (0.0.x) | `fix(parser): handle invalid expressions` | -| `docs` | Documentation only | None | `docs(readme): add troubleshooting section` | -| `style` | Code style (formatting) | None | `style(components): fix indentation` | -| `refactor` | Code change that neither fixes nor adds | None | `refactor(utils): simplify date logic` | -| `perf` | Performance improvement | Patch | `perf(filter): optimize re-renders` | -| `test` | Adding/correcting tests | None | `test(filter): add edge case coverage` | -| `build` | Build system/dependencies | None | `build(deps): update ag-grid to v34` | -| `ci` | CI configuration | None | `ci(github): add release workflow` | -| `chore` | Maintenance tasks | None | `chore(deps): update dev dependencies` | - -## Scopes - -Use these scopes to indicate what part of the codebase changed: - -- `core` - Core filter functionality -- `components` - React components -- `utils` - Utility functions -- `demo` - Demo application -- `test` - Test files -- `deps` - Dependencies -- `build` - Build configuration -- `docs` - Documentation -- `ci` - CI/CD configuration - -## Examples - -### Feature Addition - -```bash -feat(components): add keyboard navigation support - -- Add arrow key navigation between date inputs -- Add Enter key to apply filter -- Add Escape key to cancel changes - -Closes #123 -``` - -### Bug Fix - -```bash -fix(utils): correct timezone handling in date parser - -The parser was not accounting for DST transitions, -causing dates to shift by one day in certain timezones. - -BREAKING CHANGE: parseDate now requires timezone parameter -``` - -### Breaking Change - -```bash -feat(core)!: change filter model structure - -Migrate from flat to nested filter model for better extensibility. - -BREAKING CHANGE: Filter models from v1.x need migration. -See migration guide in README. -``` - -## Tips - -1. **Keep the subject line under 50 characters** -2. **Use imperative mood** ("add" not "added" or "adds") -3. **Don't end with a period** -4. **Reference issues** with "Closes #123" or "Refs #456" -5. **Explain the "why"** in the body, not just the "what" - -## Interactive Mode - -When you run `npm run commit`, you'll be prompted for: - -1. **Type of change** (feat, fix, etc.) -2. **Scope** (optional) -3. **Short description** (required) -4. **Longer description** (optional - press Enter to skip) -5. **Breaking changes** (optional) -6. **Issues this closes** (optional - e.g., "123, 456") - -## Validation - -Your commit messages are validated by commitlint. If a message doesn't follow the convention, the commit will be rejected with a helpful error message. diff --git a/README.md b/README.md index 85ea6f2..1b7cd0a 100644 --- a/README.md +++ b/README.md @@ -599,3 +599,4 @@ MIT ## 🤝 Contributing Contributions are welcome! Please read our contributing guidelines before submitting PRs. +test diff --git a/VERSIONING_WORKFLOW.md b/VERSIONING_WORKFLOW.md deleted file mode 100644 index 485d242..0000000 --- a/VERSIONING_WORKFLOW.md +++ /dev/null @@ -1,94 +0,0 @@ -# Versioning Workflow Guide - -This guide ensures GitHub tags, releases, and NPM versions stay synchronized. - -## Automated Workflow (Recommended) - -We already have GitHub Actions set up for this! Use the Release workflow: - -```bash -# Trigger via GitHub CLI -gh workflow run release.yml -f version=0.1.1 -f create_release=true -f publish_npm=true - -# Or via GitHub UI -# Go to Actions → Create Release → Run workflow -``` - -This will automatically: - -1. ✅ Update package.json version -2. ✅ Create and push a git tag -3. ✅ Create a GitHub release with changelog -4. ✅ Publish to NPM - -## Manual Workflow - -If you prefer to do it manually: - -### 1. Update Version - -```bash -# For patches (0.1.0 → 0.1.1) -npm version patch -m "chore(release): v%s" - -# For minor (0.1.0 → 0.2.0) -npm version minor -m "chore(release): v%s" - -# For major (0.1.0 → 1.0.0) -npm version major -m "chore(release): v%s" -``` - -This automatically: - -- Updates package.json -- Creates a git commit -- Creates a git tag - -### 2. Push Changes - -```bash -git push origin main --tags -``` - -### 3. Create GitHub Release - -```bash -gh release create v0.1.1 \ - --title "v0.1.1" \ - --generate-notes -``` - -### 4. Publish to NPM - -```bash -npm publish -``` - -## Quick Release Commands - -For your next release with documentation fixes: - -```bash -# Option 1: Use the automated workflow -gh workflow run release.yml -f version=0.1.1 - -# Option 2: Manual steps -npm version patch -m "chore(release): v%s - Documentation fixes" -git push origin main --tags -gh release create v0.1.1 --generate-notes -npm publish -``` - -## Version Numbering - -Follow semantic versioning: - -- **Patch** (0.1.0 → 0.1.1): Bug fixes, documentation -- **Minor** (0.1.0 → 0.2.0): New features, backward compatible -- **Major** (0.1.0 → 1.0.0): Breaking changes - -## Current State - -- **NPM**: v0.1.0 (with outdated README) -- **GitHub**: v0.1.0 tag and release (with updated README) -- **Recommended**: Release v0.1.1 to sync documentation diff --git a/docs/DEMO-DEPLOYMENT.md b/docs/development/deployment.md similarity index 100% rename from docs/DEMO-DEPLOYMENT.md rename to docs/development/deployment.md diff --git a/docs/development/github-identity.md b/docs/development/github-identity.md new file mode 100644 index 0000000..d1d2bef --- /dev/null +++ b/docs/development/github-identity.md @@ -0,0 +1,189 @@ +# GitHub Identity Management for Claude Code + +## Overview + +This document describes an optional pattern for managing GitHub identities when using Claude Code or other coding bots. This approach allows you to maintain contribution credit while enabling proper code review workflows. + +## The Hybrid Approach (Recommended) + +This pattern gives you the best of both worlds: + +- **Commits**: Authored by you (for contribution graph credit) +- **Pull Requests**: Created by your GitHub App (so you can review them) + +### How It Works + +1. **Claude commits as you** with co-authorship attribution +2. **Claude creates PRs using your GitHub App** identity +3. **You review and approve** your own PRs +4. **Clear audit trail** of human + AI collaboration + +### Benefits + +- ✅ Your contribution graph shows all activity +- ✅ You can review and approve PRs +- ✅ Clear attribution of AI assistance +- ✅ Professional workflow with proper code review +- ✅ Threaded PR discussions between you and Claude + +## Setting Up the Hybrid Approach + +### Step 1: Create Your Personal GitHub App + +1. **Go to GitHub Settings** + + - Navigate to Settings → Developer settings → GitHub Apps → New GitHub App + +2. **Configure Your App** + + - **Name**: `yourname-claude` (e.g., `ryanrozich-claude`) + - **Homepage URL**: `https://claude.ai/code` + - **Webhook**: Uncheck "Active" (not needed) + - **Permissions**: + - Repository permissions: + - Contents: Read & Write + - Pull requests: Read & Write + - Issues: Read & Write (optional) + - Actions: Read (to see workflow status) + - Account permissions: None + +3. **Create and Download Private Key** + + - After creating, click "Generate a private key" + - Save the `.pem` file securely (never commit this!) + - Store it at: `~/.github-apps/yourname-claude/private-key.pem` + +4. **Install on Your Repositories** + - Go to: `https://github.com/apps/your-app-name` + - Click "Install" + - Select repositories to grant access + +### Step 2: Configure Claude Personal Settings + +Create `CLAUDE.personal.md` in your project root: + +````markdown +# Personal Claude Configuration + +## Git Commit Configuration + +You MUST: + +1. Author commits as: Your Name +2. Include Claude as co-author WITHOUT promotional text +3. Format commits as: + + ``` + git commit -m "feat: your message + + Co-authored-by: Claude " + ``` + +``` + +## GitHub App Configuration + +- App Name: yourname-claude +- App ID: [your app id] +- Private Key Location: ~/.github-apps/yourname-claude/private-key.pem + +## Workflow + +1. Make commits as me (for contribution credit) +2. Create PRs using the GitHub App (so I can review) +``` +```` + +This file is automatically loaded by Claude and is gitignored. + +## Example Workflow + +### 1. Claude Makes Changes + +```bash +# Claude commits as you with co-authorship +git add . +git commit -m "feat: add new date filter component + +Co-authored-by: Claude " +``` + +### 2. Claude Creates PR + +```bash +# Using your GitHub App identity +gh pr create --title "Add new date filter component" \ + --body "## Summary + - Added new date filter with relative date support + - Includes comprehensive test coverage + + ## Test Plan + - [x] Unit tests pass + - [x] E2E tests pass + - [x] Manual testing completed" +``` + +### 3. You Review + +- PR shows as created by `yourname-claude[bot]` +- Commits show you as author (contribution credit maintained) +- You can review, comment, and approve +- Clear separation between human review and AI implementation + +## Alternative Approaches + +### Bot Account (Simpler Setup) + +If you prefer not to create a GitHub App: + +1. Create a dedicated GitHub account (e.g., `yourname-bot`) +2. Add it as a collaborator to your repos +3. Generate a PAT for the bot account +4. Configure Claude to use bot credentials for PRs + +### Direct Commits (No Review) + +If you don't need PR reviews: + +- Let Claude commit and push directly as you +- Still use co-authorship for transparency +- Simpler but less rigorous process + +## Security Best Practices + +- **Never commit tokens or private keys** +- **Store credentials securely** (use password managers or encrypted storage) +- **Rotate tokens regularly** +- **Use minimal permissions** (only what's needed) +- **Review GitHub App installations** periodically + +## FAQ + +### Why use this pattern? + +- Maintains your contribution graph activity +- Enables proper code review workflow +- Provides clear AI collaboration transparency +- Separates implementation from review + +### Is this required? + +No, this is completely optional. You can: + +- Use Claude with your normal GitHub account +- Skip PRs and commit directly +- Use whatever workflow suits your needs + +### What about teams? + +Teams can: + +- Create a shared GitHub App for the team +- Each member can have their own app +- Use organization-level apps with proper permissions + +## Resources + +- [GitHub Apps Documentation](https://docs.github.com/en/apps) +- [Claude Code Documentation](https://docs.anthropic.com/en/docs/claude-code) +- [Conventional Commits](https://www.conventionalcommits.org/) diff --git a/DEVELOPMENT_WORKFLOW.md b/docs/development/workflow.md similarity index 100% rename from DEVELOPMENT_WORKFLOW.md rename to docs/development/workflow.md