diff --git a/.claude/commands/gh-issue.md b/.claude/commands/gh-issue.md new file mode 100755 index 00000000..8e3a32bb --- /dev/null +++ b/.claude/commands/gh-issue.md @@ -0,0 +1,50 @@ +--- +allowed-tools: Bash(git:*), Glob, Grep, Read, mcp__github__* +description: Analyze a GitHub issue and create a comprehensive plan to solve it +--- + +# GitHub Issue Analysis + +Deep-dive on a GitHub issue. Find the problem and generate a plan. +Do not write code. Explain the problem clearly and propose a comprehensive plan to solve it. + +## Usage + +``` +/gh-issue +``` + +- `issue` (required): GitHub issue number (assumes videojs/v10 repo) or full GitHub issue URL + +### Examples + +``` +/gh-issue 123 +/gh-issue https://github.com/videojs/v10/issues/123 +``` + +## Issue + +$ARGUMENTS + +Fetch the issue details using GitHub tools. The argument above can be an issue number (assumes videojs/v10 repo) or a full GitHub issue URL. + +## Your Tasks + +You are an experienced software developer tasked with diagnosing issues. + +1. Review the issue context and details. +2. Examine the relevant parts of the codebase. Analyze the code thoroughly until you have a solid understanding of how it works. +3. Explain the issue in detail, including the problem and its root cause. +4. Create a comprehensive plan to solve the issue. The plan should include: + - Required code changes + - Potential impacts on other parts of the system + - Necessary tests to be written or updated + - Documentation updates + - Performance considerations + - Security implications + - Backwards compatibility (if applicable) + - Include the reference link to the source issue and any related discussions +5. Think deeply about all aspects of the task. Consider edge cases, potential challenges, and best practices for addressing the issue. + +**ONLY CREATE A PLAN. DO NOT WRITE ANY CODE.** Your task is to create a thorough, comprehensive strategy for understanding and resolving the issue. diff --git a/.claude/commands/review-branch.md b/.claude/commands/review-branch.md new file mode 100755 index 00000000..03d8b8a7 --- /dev/null +++ b/.claude/commands/review-branch.md @@ -0,0 +1,53 @@ +--- +allowed-tools: Bash(git:*), Glob, Grep, Read, mcp__github__* +description: Review changes in the current Git branch and suggest improvements +--- + +# Branch Review + +Inspect the changes made in this Git branch. Identify any possible issues +and suggest improvements. Do not write code. Explain the problems clearly +and propose a brief plan for addressing them. + +## Usage + +``` +/review-branch [issue] +``` + +- `issue` (optional): GitHub issue number or URL for additional context + +### Examples + +``` +/review-branch +/review-branch 123 +/review-branch https://github.com/videojs/v10/issues/123 +``` + +## Source Issue (optional) + +$ARGUMENTS + +If an issue number or URL was provided above, fetch the issue details using GitHub tools to get additional context. + +## Your Tasks + +You are an experienced software developer with expertise in code review. + +Review the change history between the current branch and its base branch. Analyze all relevant code for possible issues, including but not limited to: + +- Code quality and readability +- Code style that matches or mimics the rest of the codebase +- Potential bugs or logical errors +- Edge cases that may not be handled +- Performance considerations +- Security vulnerabilities +- Backwards compatibility (if applicable) +- Test coverage and effectiveness + +For test coverage, consider if the changes are in an area of the codebase that is testable. If so, check if there are appropriate tests added or modified. Consider if the code itself should be modified to be more testable. + +Think deeply about the implications of the changes here and proposed. + +**ONLY CREATE A SUMMARY. DO NOT WRITE ANY CODE.** diff --git a/commitlint.config.js b/commitlint.config.js index 24854064..320f5dcb 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -12,6 +12,7 @@ export default { 'scope-enum': [2, 'always', [ 'cd', 'ci', + 'claude', 'core', 'docs', 'demo', diff --git a/eslint.config.mjs b/eslint.config.mjs index b1b3ef60..4a912cf5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -23,6 +23,7 @@ export default antfu( // https://github.com/antfu/eslint-config/blob/main/src/globs.ts#L56 ignores: [ '**/CLAUDE.md', + '**/.claude/', '**/.astro/', '**/.vercel/', '**/dist/',