diff --git a/agents.md b/AGENTS.md similarity index 77% rename from agents.md rename to AGENTS.md index 359e4a66..35fe7549 100644 --- a/agents.md +++ b/AGENTS.md @@ -34,6 +34,51 @@ 3. **通知**: Claude エージェントが完了時に Slack へ通知(`CLAUDE.md` 参照) 4. **レポート作成**: 各コマンドのテンプレに従って Issue/PR コメントへ結果を貼り付ける +## 非冗長にして重複を排除する + +### 目的 + +同じ知識/意図の複数実装を一本化し、矛盾と修正漏れを防ぐ。 + +### 適用場面 + +- 同一ロジックが3箇所以上で再実装 +- マジックナンバー/リテラルが散在 +- 類似ユーティリティ/ヘルパーの乱立 + +### 基本ルール + +- 真実の所在は一箇所 +- 定数・共通ロジックを共有点へ集約 +- 使われないコードは削除 + +### 手順(最小リスク) + +1. 重複箇所を洗い出し、唯一実装を決定 +2. 参照側を順次置換(小さなPRで段階移行) +3. 旧実装を撤去し、テスト参照を一本化 + +### 測定指標(改善確認) + +- 重複率↓、同義ヘルパー数↓ +- 修正時の変更箇所数↓ +- マジック値の出現回数↓ + +### アンチパターン + +- 早すぎる共通化で可読性が下がる +- 巨大全能ヘルパーの作成 + +### 関連タグ(refactor) + +`refactor:dedupe`, `refactor:simplify`(定数化・命名整理) + +### コミット例 + +``` +refactor:dedupe date range handling across billing/reporting +``` + ## 参考ドキュメント - `CLAUDE.md`: 品質基準、AI プロンプト設計ガイド、CI 連携 diff --git a/README.md b/README.md index 2e568377..58188993 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,14 @@ It includes settings for various tools, such as the shell (Zsh), Git, npm, and V - **14 automated commands**: Code coverage checking, CI/CD troubleshooting, project initialization, pull request creation, quality checks, security reviews, test execution, dependency updates, and n8n MCP integration setup - **Development quality standards**: Japanese-language guidelines for TDD methodology, static quality gates, Git workflow conventions, and AI-assisted development practices - `.codex/`: Codex CLI configuration and agent distribution system with: - - **Agent Settings**: Centralized configuration for 13 specialized AI agents in `agents/AGENTS.md` + - **Agent Settings**: Centralized configuration for 13 specialized AI agents in `AGENTS.md` - **Distribution Scripts**: Automated setup (`setup-agents.sh`), validation (`validate-agents.sh`), and synchronization (`sync-agents.sh`) tools - **MCP Integration**: Configuration in `config.toml` for Model Context Protocol servers including Playwright and o3 search - **Prompt Library**: Migrated prompts in `prompts/` directory with setup guides and automation workflows - `.devcontainer/`: Development container configuration providing containerized development environment with consistent tooling across different machines. - `brew/`: Contains Brewfiles for different operating systems (Linux, macOS) and dependency configurations, including lock files for reproducible package installations. Supports categorized package management and dependency analysis. - `credentials/`: Contains templates and scripts for secure credential management using 1Password CLI integration. -- `docs/`: CLI tool setup guides (Japanese) for installing and configuring auxiliary tooling such as CodeRabbit CLI. +- `issues/`: Templates and helper notes for managing known issues and troubleshooting steps. - `dot/`: Directory for dotfiles and configuration files that are typically placed in the home directory, including Zsh configuration with comprehensive aliases, functions, and environment setup. - `git/`: Contains Git configuration files including gitconfig, gitignore, and modular configuration files in the `gitconfig.d/` subdirectory. - `npm/`: Contains npm global package configuration. @@ -148,12 +148,12 @@ Once installed, you can use the specialized agents in Claude Code: #### Configuration Files -- **`~/.codex/agents/AGENTS.md`**: Complete agent documentation and usage instructions +- **`AGENTS.md`**: Complete agent documentation and usage instructions(セットアップ後は `~/.codex/AGENTS.md` に同期) - **`~/.codex/config.json`**: Claude Code model configuration - **`~/.codex/config.toml`**: MCP server integration settings (Playwright browser automation, o3 search, and other MCP services) - **`~/.codex/scripts/`**: Maintenance and validation scripts -For detailed information about each agent and their capabilities, see the generated `~/.codex/agents/AGENTS.md` file after setup. +For detailed information about each agent and their capabilities, see `AGENTS.md`. ### Secure MCP Credential Configuration diff --git a/jest.config.js b/jest.config.js index 9b21361e..33fbdbf0 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,7 +1,7 @@ module.exports = { testEnvironment: 'node', testMatch: ['**/test/**/*.test.js', '**/test/**/*.spec.js'], - collectCoverageFrom: ['scripts/**/*.js', '!scripts/**/*.test.js', '!scripts/**/*.spec.js'], + collectCoverageFrom: ['script/**/*.js', '!script/**/*.test.js', '!script/**/*.spec.js'], coverageDirectory: 'coverage', coverageReporters: ['text', 'lcov', 'html'], coverageThreshold: {