From a246cfef08488b62037a88c69b0907439c316c70 Mon Sep 17 00:00:00 2001 From: shinpr Date: Fri, 15 Aug 2025 10:56:41 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E3=82=B5=E3=83=96=E3=82=A8=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=A7=E3=83=B3=E3=83=88=E3=81=8Cimplementation-app?= =?UTF-8?q?roach.md=E3=82=92=E9=81=A9=E5=88=87=E3=81=AB=E5=8F=82=E7=85=A7?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 変更内容 - technical-designer: 初回必須タスクにimplementation-approach.mdを追加し、Phase 1-4実行を明記 - work-planner: 初回必須タスクに追加し、L1/L2/L3確認レベルの使用を明記 - task-executor: 進捗チェックボックス更新を具体的な手順に改善(Editツール使用を明記) ## 改善効果 - 垂直/水平スライスの検討が適切に行われるようになる - 進捗更新の漏れを防止できる - AIの実行精度が向上する 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .claude/agents-ja/task-executor.md | 12 ++++++++++-- .claude/agents-ja/technical-designer.md | 6 ++++-- .claude/agents-ja/work-planner.md | 3 ++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.claude/agents-ja/task-executor.md b/.claude/agents-ja/task-executor.md index b192b07..b71a106 100644 --- a/.claude/agents-ja/task-executor.md +++ b/.claude/agents-ja/task-executor.md @@ -66,7 +66,10 @@ ls docs/plans/tasks/*.md | grep -E "task-[0-9]{2}\.md$" | head -1 ### 3. 実装実行 - 全チェックボックスが`[x]`の場合は「既に完了」と報告して終了 - 段階的実装と逐次確認 -- 各ステップ完了時に3箇所同期更新 +- 各ステップ完了時に【必須】Editツールでチェックボックスを更新: + 1. タスクファイル: `[ ]` → `[x]` + 2. 作業計画書の該当箇所: `[ ]` → `[x]` + 3. 全体設計書の進捗セクション(存在する場合) - 追加したテストのみを実行して通ることを確認(全体テストは不要) ### 3.5 動作確認【必須】 @@ -97,6 +100,11 @@ ls docs/plans/tasks/*.md | grep -E "task-[0-9]{2}\.md$" | head -1 "filesModified": ["file1.ts", "file2.ts"], "testsAdded": ["test1.test.ts"], "newTestsPassed": true, + "progressUpdated": { + "taskFile": "完了項目5/8", + "workPlan": "更新済み", + "designDoc": "N/A" + }, "runnableCheck": { "level": "L1/L2/L3", "executed": true, @@ -111,7 +119,7 @@ ls docs/plans/tasks/*.md | grep -E "task-[0-9]{2}\.md$" | head -1 ## 実行原則 -- **3箇所同期更新**: 各アクション完了時に必ず更新 +- **進捗チェックボックス更新**: 各アクション完了時にEditツールで必ず`[ ]`→`[x]`に更新 - **全体設計書確認**: 実装前に必須 - **完全自己完結**: 質問せず最後まで実行 - **テストファースト**: Red-Green-Refactorプロセス遵守(プロジェクトのテストルールに従う) diff --git a/.claude/agents-ja/technical-designer.md b/.claude/agents-ja/technical-designer.md index 84d7e2f..93fabb2 100644 --- a/.claude/agents-ja/technical-designer.md +++ b/.claude/agents-ja/technical-designer.md @@ -14,6 +14,7 @@ tools: Read, Write, Edit, MultiEdit, Glob, LS, TodoWrite, WebSearch - @docs/rules/typescript.md - TypeScript開発ルール - @docs/rules/ai-development-guide.md - AI開発ガイド - @docs/rules/project-context.md - プロジェクトコンテキスト +- @docs/rules/architecture/implementation-approach.md - メタ認知的戦略選択プロセス(実装アプローチ決定で使用) - @docs/rules/architecture/ 配下のアーキテクチャルールファイル(存在する場合) - プロジェクト固有のアーキテクチャルールが定義されている場合は読み込む - 採用されているアーキテクチャパターンに応じたルールを適用 @@ -80,14 +81,15 @@ Design Doc作成の最初に必ず実施: Design Doc作成時に必ず実施: 1. **アプローチの選択判定** + - @docs/rules/architecture/implementation-approach.mdのPhase 1-4を実行して戦略を選択 - **垂直スライス**: 機能単位で完結、外部依存最小、価値提供が早い - **水平スライス**: 層単位で実装、共通基盤重要、技術的一貫性優先 - **ハイブリッド**: 複合的、複雑な要件に対応 - - 選択理由の明文化(機能の複雑性、依存関係、統合ポイントを考慮) + - 選択理由の明文化(メタ認知的戦略選択プロセスの結果を記載) 2. **統合ポイントの定義** - どのタスクで全体が初めて動作するか - - 各タスクの確認レベル(@docs/rules/architecture/implementation-approach.mdで定義) + - 各タスクの確認レベル(@docs/rules/architecture/implementation-approach.mdで定義されたL1/L2/L3) ### 変更影響マップ【必須】 Design Doc作成時に必ず含める。 diff --git a/.claude/agents-ja/work-planner.md b/.claude/agents-ja/work-planner.md index 6a3dda2..e14a3a1 100644 --- a/.claude/agents-ja/work-planner.md +++ b/.claude/agents-ja/work-planner.md @@ -15,6 +15,7 @@ tools: Read, Write, Edit, MultiEdit, Glob, LS, TodoWrite - @docs/rules/typescript-testing.md - テストルール - @docs/rules/project-context.md - プロジェクトコンテキスト - @docs/rules/typescript.md - TypeScript開発ルール +- @docs/rules/architecture/implementation-approach.md - 実装戦略パターンと確認レベル定義(タスク分解で使用) - @docs/rules/architecture/ 配下のアーキテクチャルールファイル(存在する場合) - プロジェクト固有のアーキテクチャルールが定義されている場合は読み込む - 採用されているアーキテクチャパターンに応じたルールを適用 @@ -80,7 +81,7 @@ tools: Read, Write, Edit, MultiEdit, Glob, LS, TodoWrite ## タスク分解の原則 ### 実装アプローチの適用 -タスク順序の決定において、Design Docで決定された実装アプローチ(垂直/水平/ハイブリッドスライス)に基づいてタスクを分解する。 +Design Docで決定された実装アプローチに基づき、@docs/rules/architecture/implementation-approach.mdの統合ポイント定義とL1/L2/L3確認レベルに従ってタスクを分解する。 ### タスク依存の最小化ルール - 依存は最大2階層まで(A→B→Cは可、A→B→C→Dは再設計) From 370992c3f3ff6e04c69ca3f06ea6a673b80bc57d Mon Sep 17 00:00:00 2001 From: shinpr Date: Fri, 15 Aug 2025 11:02:27 +0900 Subject: [PATCH 2/2] feat: Apply implementation-approach.md references to English version subagents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changes (English agents) - technical-designer: Add implementation-approach.md to initial tasks, clarify Phase 1-4 execution - work-planner: Add to initial tasks, specify L1/L2/L3 verification level usage - task-executor: Improve progress update with concrete Edit tool instructions ## Improvements - Ensures proper consideration of vertical/horizontal slicing strategies - Prevents progress tracking omissions - Improves AI execution accuracy across language environments 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .claude/agents-en/task-executor.md | 12 ++++++++++-- .claude/agents-en/technical-designer.md | 6 ++++-- .claude/agents-en/work-planner.md | 6 +++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.claude/agents-en/task-executor.md b/.claude/agents-en/task-executor.md index e7c02a3..4ccbafd 100644 --- a/.claude/agents-en/task-executor.md +++ b/.claude/agents-en/task-executor.md @@ -66,7 +66,10 @@ ls docs/plans/tasks/*.md | grep -E "task-[0-9]{2}\.md$" | head -1 ### 3. Implementation Execution - If all checkboxes are `[x]`, report "already completed" and end - Staged implementation with incremental verification -- 3-location synchronized update upon each step completion +- Upon each step completion【Required】Update checkboxes using Edit tool: + 1. Task file: `[ ]` → `[x]` + 2. Corresponding section in work plan: `[ ]` → `[x]` + 3. Progress section in overall design document (if exists) - Run only added tests and confirm they pass (overall tests not needed) ### 3.5 Operation Verification【Mandatory】 @@ -97,6 +100,11 @@ Report in the following JSON format upon task completion (**without executing qu "filesModified": ["file1.ts", "file2.ts"], "testsAdded": ["test1.test.ts"], "newTestsPassed": true, + "progressUpdated": { + "taskFile": "5/8 items completed", + "workPlan": "Updated", + "designDoc": "N/A" + }, "runnableCheck": { "level": "L1/L2/L3", "executed": true, @@ -111,7 +119,7 @@ Report in the following JSON format upon task completion (**without executing qu ## Execution Principles -- **3-location synchronized update**: Always update upon each action completion +- **Progress checkbox update**: Always update `[ ]`→`[x]` using Edit tool upon each action completion - **Overall design document confirmation**: Required before implementation - **Complete self-containment**: Execute to the end without asking questions - **Test-first**: Adhere to Red-Green-Refactor process (follow project test rules) diff --git a/.claude/agents-en/technical-designer.md b/.claude/agents-en/technical-designer.md index 1259087..56aff85 100644 --- a/.claude/agents-en/technical-designer.md +++ b/.claude/agents-en/technical-designer.md @@ -14,6 +14,7 @@ Before starting work, be sure to read and follow these rule files: - @docs/rules/typescript.md - TypeScript development rules - @docs/rules/ai-development-guide.md - AI development guide - @docs/rules/project-context.md - Project context +- @docs/rules/architecture/implementation-approach.md - Metacognitive strategy selection process (used for implementation approach decisions) - @docs/rules/architecture/ architecture rule files (if exist) - Read if project-specific architecture rules are defined - Apply rules according to adopted architecture patterns @@ -80,14 +81,15 @@ Must be performed at the beginning of Design Doc creation: Must be performed when creating Design Doc: 1. **Approach Selection Criteria** + - Execute Phase 1-4 of @docs/rules/architecture/implementation-approach.md to select strategy - **Vertical Slice**: Complete by feature unit, minimal external dependencies, early value delivery - **Horizontal Slice**: Implementation by layer, important common foundation, technical consistency priority - **Hybrid**: Composite, handles complex requirements - - Document selection reason (consider feature complexity, dependencies, integration points) + - Document selection reason (record results of metacognitive strategy selection process) 2. **Integration Point Definition** - Which task first makes the whole system operational - - Verification level for each task (defined in @docs/rules/architecture/implementation-approach.md) + - Verification level for each task (L1/L2/L3 defined in @docs/rules/architecture/implementation-approach.md) ### Change Impact Map【Required】 Must be included when creating Design Doc. diff --git a/.claude/agents-en/work-planner.md b/.claude/agents-en/work-planner.md index 0592b29..8ed4095 100644 --- a/.claude/agents-en/work-planner.md +++ b/.claude/agents-en/work-planner.md @@ -15,6 +15,10 @@ Before starting work, be sure to read and follow these rule files: - @docs/rules/typescript-testing.md - Testing rules - @docs/rules/project-context.md - Project context - @docs/rules/typescript.md - TypeScript development rules +- @docs/rules/architecture/implementation-approach.md - Implementation strategy patterns and verification level definitions (used for task decomposition) +- @docs/rules/architecture/ architecture rule files (if exist) + - Read if project-specific architecture rules are defined + - Apply rules according to adopted architecture patterns ## Main Responsibilities @@ -80,7 +84,7 @@ Include completion conditions in task names (e.g., "Service implementation and u ## Task Decomposition Principles ### Implementation Approach Application -Determine task sequence based on the implementation approach (vertical/horizontal/hybrid slice) decided in the Design Doc. +Decompose tasks based on the implementation approach decided in the Design Doc, following the integration point definitions and L1/L2/L3 verification levels from @docs/rules/architecture/implementation-approach.md. ### Task Dependency Minimization Rules - Dependencies up to 2 levels maximum (A→B→C acceptable, A→B→C→D requires redesign)