Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
9d27ecd
docs: add CLAUDE.md
cawpea Dec 29, 2025
3783097
docs: add git commit rules to CLAUDE.md
cawpea Dec 29, 2025
ca6ab42
chore: add .node-version
cawpea Dec 29, 2025
43bf006
feat: implement configuration system
cawpea Dec 29, 2025
19efe8c
feat: migrate core logic and utils from figma-a11y-reviewer
cawpea Dec 29, 2025
b6638ef
feat: integrate configuration system into validate.ts
cawpea Dec 29, 2025
6192ccd
feat: integrate configuration system into fix.ts
cawpea Dec 29, 2025
3ec29f8
feat: implement CLI with commander and programmatic API
cawpea Dec 29, 2025
a681f74
test: move test files to be co-location
cawpea Dec 29, 2025
ccf41aa
style: add ESLint and Prettier
cawpea Dec 29, 2025
0ec5bb1
chore: delete .claude file in git
cawpea Dec 29, 2025
4fcc504
chore: export fix function
cawpea Dec 29, 2025
144e829
test: add unit tests for utils
cawpea Dec 30, 2025
0bd6ce9
refactor: add baseUrl and alias in tsconfig.json
cawpea Dec 30, 2025
46e0c32
ci: exec test before push to git
cawpea Dec 30, 2025
8fa4c99
ci: add github action for lint and format
cawpea Dec 30, 2025
db5f795
Merge pull request #5 from cawpea/feature/#1_add-workflow-for-linting…
cawpea Dec 30, 2025
50dc2c5
ci: add github action for test
cawpea Dec 30, 2025
e46ecd1
Merge pull request #7 from cawpea/feature/#6_add-github-action-for-test
cawpea Dec 30, 2025
453846d
"Claude PR Assistant workflow"
cawpea Dec 30, 2025
6fd0c59
"Claude Code Review workflow"
cawpea Dec 30, 2025
624f665
style: translate japanese of claude code review
cawpea Dec 30, 2025
3937bca
Merge pull request #9 from cawpea/add-claude-github-actions-176707595…
cawpea Dec 30, 2025
6cd5843
docs: split documents from CLAUDE.md
cawpea Dec 30, 2025
be5b41d
fix: add pull-requests write permission to claude-code-review workflow
cawpea Dec 30, 2025
12797b1
Merge pull request #12 from cawpea/feature/#4_split-documents
cawpea Dec 30, 2025
cd8f000
chore: remove vscode setting from .gitignore
cawpea Dec 30, 2025
4a20066
feat: translate japanese logs and comments to english
cawpea Dec 30, 2025
0b8dcee
Merge pull request #13 from cawpea/feature/#10_translate-japanese-to-…
cawpea Dec 30, 2025
dc923c0
ci: add release workflow usign semantic-release
cawpea Dec 30, 2025
f4cd0b8
feat: translate comments and logs to english in src/cli/fix.ts
cawpea Dec 30, 2025
d7a7053
ci: translate prompt to english in claude-code-review workflow
cawpea Dec 30, 2025
7b2dafb
feat: translate comments and messages to english in src/utils/fix.ts …
cawpea Dec 30, 2025
79f609e
feat: translate comments and messages to english in src/core/validate…
cawpea Dec 30, 2025
68c57ba
fix: translate remaining japanese character to english in src/utils/f…
cawpea Dec 30, 2025
d1410e6
Merge pull request #15 from cawpea/feature/#10_translate-japanese-to-…
cawpea Dec 30, 2025
97724b3
fix: update project root to use config
cawpea Dec 30, 2025
ae5ab6a
chore: update log format
cawpea Dec 30, 2025
aa7ab48
test: fix prompt tests to match updated log format
cawpea Dec 30, 2025
82d7dd4
Merge pull request #16 from cawpea/feature/fix-bug-of-project-root
cawpea Dec 30, 2025
4de8ca7
chore: remove unnecessary variable
cawpea Dec 30, 2025
3b3a750
style: update style code format using chalk
cawpea Dec 31, 2025
418c4aa
test: add unit test for utils
cawpea Dec 31, 2025
e136426
test: fix test errors by chalk
cawpea Dec 31, 2025
583edc6
Merge pull request #19 from cawpea/feature/#17_update-style-for-code-…
cawpea Dec 31, 2025
41c5fae
docs: add documantation.md
cawpea Dec 31, 2025
26e561b
build: add scripts to check diff to update documents
cawpea Dec 31, 2025
6c16049
docs: add validation workflow in documentation.md
cawpea Dec 31, 2025
16afd6f
docs: add documentation validation command to guides
cawpea Dec 31, 2025
a065ec9
test: add unit tests for scripts
cawpea Dec 31, 2025
4b3fc3e
chore: add update-docs command to version control
cawpea Dec 31, 2025
4629e12
docs: add CODE_REF usage guidelines to documentation guide
cawpea Dec 31, 2025
2f66247
fix: preserve error context in git-diff error handling
cawpea Dec 31, 2025
236ad04
feat: add ESLint configuration for scripts directory
cawpea Dec 31, 2025
dd09f3a
Revert "fix: preserve error context in git-diff error handling"
cawpea Dec 31, 2025
105a9c2
fix: prevent command injection in git-diff by using spawnSync
cawpea Dec 31, 2025
7b56376
refactor: separate business logic and presentation in validate-docs
cawpea Dec 31, 2025
dbac613
fix: correct collectCoverageFrom pattern order in Jest config
cawpea Dec 31, 2025
adb8cfd
Merge pull request #20 from cawpea/feature/#18_build-system-for-docum…
cawpea Dec 31, 2025
d098259
feat: add variable reference support in CODE_REF
cawpea Dec 31, 2025
49a8f91
docs: add variable reference documentation
cawpea Dec 31, 2025
7b67d19
docs: add variable reference documentation
cawpea Dec 31, 2025
dcb029b
Merge branch 'feature/#3_support-variables-in-coderef' of github.com:…
cawpea Dec 31, 2025
49b7617
Merge pull request #21 from cawpea/feature/#3_support-variables-in-co…
cawpea Dec 31, 2025
8c7a4a8
Merge branch 'develop' of github.com:cawpea/coderef into feature/#2_a…
cawpea Dec 31, 2025
22b286b
chore: update minimum Node.js version to 20.0.0
cawpea Dec 31, 2025
d184f46
docs: update minimum Node.js version to 20.0.0
cawpea Dec 31, 2025
5f4cc08
chore: update minimum Node.js version to 22.0.0
cawpea Dec 31, 2025
e1d0b33
Merge pull request #14 from cawpea/feature/#2_automate-release-workflow
cawpea Dec 31, 2025
87084fa
docs: add CODE_REF usage examples to README
cawpea Dec 31, 2025
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
66 changes: 66 additions & 0 deletions .claude/commands/update-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
description: 'Investigate whether documentation updates are needed and update as necessary'
---

# Documentation Update Command

This command automatically updates documentation in response to code changes.

## Execution Steps

1. **Run Documentation Validation**
- Run `npm run docs:validate` to check code changes
- Get list of changed files

2. **Analyze Changes**
- Check specific changes in each file
- Identify important changes that require documentation updates

3. **Understand Current Documentation Structure**
- Refer to `docs/development/documentation.md`

4. **Criteria for Changes Requiring Documentation Updates**
- Refer to `docs/development/documentation.md`

5. **Update Documentation**
- Refer to `docs/development/documentation.md`
- Run `npm run format` to format documentation

6. **Verify**
- Run `npm run docs:validate` to verify
- Check diff of updated documentation

7. **Report Results to User**
- List of updated documentation
- Summary of main changes
- List of files to commit

## Output Format

Present summary in the following format at the end:

```
## Completed!

### 📝 Updated Documentation

#### 1. [File Name] (+X lines, -Y lines)
- Change 1
- Change 2

### 🔍 Investigation Results

[Explanation of main changes]

### Next Steps

Review the changes and commit as necessary:
`git commit -m {commit message}`
```

## Notes

- Update CLAUDE.md only when important design policies change (usually only under `docs/`)
- No update needed for minor changes or internal implementation changes
- Type system or API specification changes must be reflected
- Ensure CODE_REF comments reference the latest code
57 changes: 57 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"

jobs:
claude-review:
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}

Please review this pull request and provide feedback on the following aspects:
- Code quality and best practices
- Potential bugs or issues
- Performance concerns
- Security concerns
- Test coverage
- Documentation update needs

For style and coding conventions, please refer to `CLAUDE.md` in the repository as a guide. Feedback should be constructive and helpful.
Please post your review as a comment on the PR using the `gh pr comment` command via the Bash tool.

# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
50 changes: 50 additions & 0 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Claude Code

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read

# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
# prompt: 'Update the pull request description to include a summary of changes.'

# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr:*)'

31 changes: 31 additions & 0 deletions .github/workflows/docs-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Documentation Validation

on:
pull_request:
branches: [main, develop]

jobs:
validate-docs:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x]

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history for git diff

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Validate documentation updates
run: npm run docs:validate
37 changes: 37 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Lint, Format Check, and Type Check

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
code-quality:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

- name: Check code formatting
run: npm run format:check

- name: Run type check
run: npm run type-check
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write
issues: write
pull-requests: write
id-token: write

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build package
run: npm run build

- name: Run tests
run: npm test

- name: Run linter
run: npm run lint

- name: Run type check
run: npm run type-check

- name: Verify build artifacts
run: |
if [ ! -d "dist" ]; then
echo "Build failed: dist directory not found"
exit 1
fi
echo "Build artifacts verified successfully"

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,13 @@ dist
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode/
.vscode-test

# Claude.ai files
.claude/*
!.claude/commands/

# yarn v3
.pnp.*
.yarn/*
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run test
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.19.0
25 changes: 25 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Build outputs
dist/
build/
coverage/

# Dependencies
node_modules/

# Lock files (machine-generated)
package-lock.json
yarn.lock
pnpm-lock.yaml

# Logs
*.log

# Cache
.eslintcache
*.tsbuildinfo

# Test snapshots (if any)
**/__snapshots__/

# Generated files
CHANGELOG.md
Loading