diff --git a/.claude/commands/README.md b/.claude/commands/README.md index 7195933b..7e94c2e3 100644 --- a/.claude/commands/README.md +++ b/.claude/commands/README.md @@ -1,155 +1,40 @@ # Claude Automated Commands -This directory contains 14 pre-configured commands that provide automated workflows for common development tasks. These commands can be invoked directly by Claude or triggered automatically based on repository events and context. +This directory contains 2 pre-configured commands that provide automated workflows for common development tasks. These commands can be invoked directly by Claude or triggered automatically based on repository events and context. Additional automated commands are available in the `.codex/prompts/` directory. -## Command Categories +## Available Commands -### Quality & Testing +### Git Workflow -#### `check-coverage.md` +#### `git-sync.md` -**Purpose**: Analyzes test coverage reports and identifies areas needing attention -**Triggers**: - -- Coverage drops below configured thresholds -- New code additions without corresponding tests -- Manual coverage analysis requests - -#### `quality-check.md` - -**Purpose**: Runs comprehensive code quality analysis including linting, formatting, and static analysis -**Triggers**: - -- Pre-commit hooks -- Pull request creation -- Manual quality validation requests - -#### `test-all.md` - -**Purpose**: Executes complete test suite with proper reporting and failure analysis -**Triggers**: - -- Major code changes -- Release preparation -- CI/CD pipeline integration - -### Project Management - -#### `init-project.md` - -**Purpose**: Sets up new projects with standardized structure, tools, and configurations +**Purpose**: Provides comprehensive Git synchronization and branch management workflows **Features**: -- Dependency management setup -- CI/CD pipeline configuration -- Quality gate establishment -- Documentation templates - -#### `issue-auto-resolve.md` +- Branch synchronization with upstream +- Conflict resolution guidance +- Git workflow automation +- Repository state validation -**Purpose**: Automated issue analysis and resolution using specialized agents -**Capabilities**: +### Development Environment -- Issue classification and priority assessment -- Automated fix generation for common problems -- Multi-agent coordination for complex issues -- Solution validation and testing +#### `setup-husky.md` -#### `issue-create.md` - -**Purpose**: Creates well-structured GitHub issues with proper templates and metadata -**Features**: - -- Issue template selection -- Automatic labeling and assignment -- Related issue linking -- Priority and milestone setting - -#### `issue-review.md` - -**Purpose**: Reviews existing issues for completeness, priority, and actionability -**Functions**: - -- Issue triage and categorization -- Duplicate detection and consolidation -- Priority reassessment -- Resolution pathway recommendations - -### Pull Request Workflow - -#### `pr.md` - -**Purpose**: Comprehensive pull request analysis and preparation +**Purpose**: Configures Husky Git hooks for automated code quality enforcement **Features**: -- Automated PR description generation -- Change impact analysis -- Reviewer suggestion based on code ownership -- Merge readiness assessment - -#### `review-feedback-processor.md` +- Pre-commit hook setup +- Commit message validation +- Code quality gate enforcement +- Development workflow integration -**Purpose**: Processes and responds to code review feedback systematically -**Capabilities**: +## Additional Commands -- Feedback categorization and prioritization -- Automated response generation -- Code change suggestions -- Discussion thread management +For a comprehensive set of automated development commands, see the `.codex/prompts/` directory which contains 11 specialized prompts for: -### CI/CD & Maintenance - -#### `fix-ci.md` - -**Purpose**: Diagnoses and resolves continuous integration pipeline failures -**Diagnostic Areas**: - -- Build failures and dependency issues -- Test failures and environment problems -- Deployment issues and configuration errors -- Performance bottlenecks and resource constraints - -#### `security-review.md` - -**Purpose**: Conducts comprehensive security analysis of code changes -**Security Checks**: - -- Vulnerability scanning and assessment -- Authentication and authorization validation -- Data protection compliance -- Security best practices enforcement - -#### `update-deps.md` - -**Purpose**: Manages dependency updates with safety checks and compatibility validation -**Features**: - -- Automated dependency analysis -- Breaking change detection -- Security vulnerability assessment -- Update strategy recommendations - -### Integration & Automation - -#### `n8n-mcp-setup.md` - -**Purpose**: Configures n8n workflows with Model Context Protocol (MCP) integration -**Setup Areas**: - -- Workflow automation configuration -- API endpoint integration -- Event trigger setup -- Data flow optimization - -#### `commit.md` - -**Purpose**: Ensures commit message quality and conventional commit compliance -**Validation**: - -- Conventional commit format enforcement -- Commit message clarity and completeness -- Change scope validation -- Breaking change identification +- **Security Analysis**: Next.js security checks, dependency scanning, configuration auditing +- **Code Refactoring**: Decoupling, deduplication, reorganization, simplification +- **Git Operations**: Advanced Git workflows and synchronization ## Command Usage @@ -158,10 +43,15 @@ This directory contains 14 pre-configured commands that provide automated workfl Commands can be invoked directly in Claude interactions: ``` -@claude run the quality-check command on the current branch -@claude execute check-coverage for the test suite -@claude use fix-ci to diagnose the build failure -@claude run issue-auto-resolve for issue #123 +@claude run git-sync to synchronize the current branch +@claude execute setup-husky to configure Git hooks +``` + +For additional commands available in `.codex/prompts/`: +``` +@claude use next-security-check for comprehensive security analysis +@claude run refactor:decouple to improve code organization +@claude execute next-security:deps-scan for dependency vulnerability scanning ``` ### Automatic Triggers diff --git a/.codex/prompts/README.md b/.codex/prompts/README.md index cd3e63f1..5600d648 100644 --- a/.codex/prompts/README.md +++ b/.codex/prompts/README.md @@ -1,123 +1,119 @@ -# Claude Automated Commands +# Codex Automated Prompts -This directory contains 14 pre-configured commands that provide automated workflows for common development tasks. These commands can be invoked directly by Claude or triggered automatically based on repository events and context. +This directory contains 11 pre-configured prompts that provide automated workflows for common development tasks. These prompts can be invoked directly by Codex CLI or triggered automatically based on repository events and context. ## Command Categories ### Quality & Testing -#### `check-coverage.md` +### Security Analysis -**Purpose**: Analyzes test coverage reports and identifies areas needing attention -**Triggers**: +#### `next-security-check.md` -- Coverage drops below configured thresholds -- New code additions without corresponding tests -- Manual coverage analysis requests +**Purpose**: Comprehensive security review for Next.js applications +**Features**: -#### `quality-check.md` +- Full security audit workflow +- Dependency vulnerability scanning +- Configuration security assessment +- Authorization flow validation -**Purpose**: Runs comprehensive code quality analysis including linting, formatting, and static analysis -**Triggers**: +#### `next-security:deps-scan.md` -- Pre-commit hooks -- Pull request creation -- Manual quality validation requests +**Purpose**: Focused dependency vulnerability scanning for Next.js applications +**Features**: -#### `test-all.md` +- `npm audit --omit dev` execution for critical/high vulnerabilities +- Major package delay detection via `npm outdated` +- Security-related ESLint plugin version health checks +- Severity-based summary and response plan templates -**Purpose**: Executes complete test suite with proper reporting and failure analysis -**Triggers**: +#### `next-security:config-audit.md` -- Major code changes -- Release preparation -- CI/CD pipeline integration +**Purpose**: Static audit of Next.js configuration files and build output +**Checks**: -### Project Management +- HSTS, CSP, Permissions-Policy, images.domains, environment variable exposure settings +- `next-safe-middleware` / `helmet` application status and matcher coverage +- `npm run lint / type-check / build` execution to collect warnings and configuration issues -#### `init-project.md` +#### `next-security:authz-review.md` -**Purpose**: Sets up new projects with standardized structure, tools, and configurations -**Features**: +**Purpose**: Reviews authentication and authorization flows (RBAC/ABAC) in Next.js applications +**Highlights**: -- Dependency management setup -- CI/CD pipeline configuration -- Quality gate establishment -- Documentation templates +- Verification that middleware/API routes/Server Actions enforce roles and permissions +- NextAuth/Lucia session configuration, Cookie, and CSRF countermeasures inventory +- Role × resource matrix and gap correction action reporting -#### `issue-auto-resolve.md` +### Code Refactoring -**Purpose**: Automated issue analysis and resolution using specialized agents -**Capabilities**: +#### `refactor:decouple.md` -- Issue classification and priority assessment -- Automated fix generation for common problems -- Multi-agent coordination for complex issues -- Solution validation and testing +**Purpose**: Guides decoupling of tightly coupled code components +**Focus**: -#### `issue-create.md` +- Component dependency reduction +- Interface-based design patterns +- Separation of concerns improvement -**Purpose**: Creates well-structured GitHub issues with proper templates and metadata -**Features**: +#### `refactor:dedupe.md` -- Issue template selection -- Automatic labeling and assignment -- Related issue linking -- Priority and milestone setting +**Purpose**: Eliminates code duplication and consolidates redundant implementations +**Focus**: -#### `issue-review.md` +- Duplicate code identification +- Common utility extraction +- Single source of truth establishment -**Purpose**: Reviews existing issues for completeness, priority, and actionability -**Functions**: +#### `refactor:reorganize.md` -- Issue triage and categorization -- Duplicate detection and consolidation -- Priority reassessment -- Resolution pathway recommendations +**Purpose**: Improves code organization and project structure +**Focus**: -### Pull Request Workflow +- File and directory restructuring +- Logical grouping of related functionality +- Import path optimization -#### `pr.md` +#### `refactor:simplify.md` -**Purpose**: Comprehensive pull request analysis and preparation -**Features**: +**Purpose**: Simplifies complex code structures and reduces cognitive load +**Focus**: -- Automated PR description generation -- Change impact analysis -- Reviewer suggestion based on code ownership -- Merge readiness assessment +- Complex logic breakdown +- Unnecessary abstraction removal +- Code readability improvement -#### `review-feedback-processor.md` +#### `refactor:split.md` -**Purpose**: Processes and responds to code review feedback systematically -**Capabilities**: +**Purpose**: Splits large files or functions into smaller, manageable pieces +**Focus**: -- Feedback categorization and prioritization -- Automated response generation -- Code change suggestions -- Discussion thread management +- Large file decomposition +- Function size reduction +- Modular design promotion -### CI/CD & Maintenance +### Development Environment -#### `fix-ci.md` +#### `git-sync.md` -**Purpose**: Diagnoses and resolves continuous integration pipeline failures -**Diagnostic Areas**: +**Purpose**: Provides comprehensive Git synchronization and branch management workflows +**Features**: -- Build failures and dependency issues -- Test failures and environment problems -- Deployment issues and configuration errors -- Performance bottlenecks and resource constraints +- Branch synchronization with upstream +- Conflict resolution guidance +- Git workflow automation +- Repository state validation -#### `security-review.md` +#### `setup-husky.md` -**Purpose**: Conducts comprehensive security analysis of code changes -**Security Checks**: +**Purpose**: Configures Husky Git hooks for automated code quality enforcement +**Features**: -- Vulnerability scanning and assessment -- Authentication and authorization validation -- Data protection compliance -- Security best practices enforcement +- Pre-commit hook setup +- Commit message validation +- Code quality gate enforcement +- Development workflow integration #### `next-security:deps-scan.md` @@ -146,37 +142,6 @@ This directory contains 14 pre-configured commands that provide automated workfl - NextAuth/Lucia のセッション設定、Cookie、CSRF 対策の棚卸し - ロール×リソース表とギャップ修正アクションをレポート化 -#### `update-deps.md` - -**Purpose**: Manages dependency updates with safety checks and compatibility validation -**Features**: - -- Automated dependency analysis -- Breaking change detection -- Security vulnerability assessment -- Update strategy recommendations - -### Integration & Automation - -#### `n8n-mcp-setup.md` - -**Purpose**: Configures n8n workflows with Model Context Protocol (MCP) integration -**Setup Areas**: - -- Workflow automation configuration -- API endpoint integration -- Event trigger setup -- Data flow optimization - -#### `commit.md` - -**Purpose**: Ensures commit message quality and conventional commit compliance -**Validation**: - -- Conventional commit format enforcement -- Commit message clarity and completeness -- Change scope validation -- Breaking change identification ## Command Usage @@ -185,10 +150,10 @@ This directory contains 14 pre-configured commands that provide automated workfl Commands can be invoked directly in Claude interactions: ``` -@claude run the quality-check command on the current branch -@claude execute check-coverage for the test suite -@claude use fix-ci to diagnose the build failure -@claude run issue-auto-resolve for issue #123 +codex run next-security-check +codex execute refactor:decouple +codex run next-security:deps-scan +codex execute git-sync ``` ### Automatic Triggers diff --git a/README.md b/README.md index 58188993..8e614394 100644 --- a/README.md +++ b/README.md @@ -293,13 +293,16 @@ The `.claude/agents/` directory provides 13 specialized agents: #### Automated Commands -The `.claude/commands/` directory provides 14 pre-configured commands: +The `.claude/commands/` directory provides 2 pre-configured commands, with additional automated prompts available in `.codex/prompts/` (11 prompts): -- **Quality & Testing**: `check-coverage.md`, `quality-check.md`, `test-all.md` -- **Project Management**: `init-project.md`, `issue-auto-resolve.md`, `issue-create.md`, `issue-review.md` -- **Pull Request Workflow**: `pr-create.md`, `pr.md`, `review-feedback-processor.md` -- **CI/CD & Maintenance**: `fix-ci.md`, `security-review.md`, `update-deps.md` -- **Integration Setup**: `n8n-mcp-setup.md` +- **Git Workflow**: `git-sync.md` - Comprehensive Git synchronization and branch management +- **Development Environment**: `setup-husky.md` - Husky Git hooks configuration + +#### Additional Codex Prompts (`.codex/prompts/`) + +- **Security Analysis**: `next-security-check.md`, `next-security:deps-scan.md`, `next-security:config-audit.md`, `next-security:authz-review.md` +- **Code Refactoring**: `refactor:decouple.md`, `refactor:dedupe.md`, `refactor:reorganize.md`, `refactor:simplify.md`, `refactor:split.md` +- **Development Environment**: `git-sync.md` (also available via Codex), `setup-husky.md` (also available via Codex) #### Development Quality Standards