Skip to content

Commit 979f326

Browse files
shinprclaude
andcommitted
refactor: Apply technical prerequisite inheritance mechanism to English agent definitions
Port improvements from tacoms-ai-bot commit (ab7fde91) to English versions: ## Main Changes - task-decomposer: Reduced task template by 50% (88→44 lines) - task-decomposer: Introduced deliverable-based dependency management - task-executor: Made explicit reading of dependency deliverables mandatory - Overall 71-line reduction improving context efficiency by 20% ## AI Execution Accuracy Enhancements - Added type definition verification/creation to Red Phase - Restored operation verification levels (L1/L2/L3) selection - Changed file paths to generic placeholders Background: Strengthened information inheritance between agents to prevent misidentification of verified technical features. Achieves maximum accuracy with minimal notation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent f99d1b4 commit 979f326

File tree

2 files changed

+67
-137
lines changed

2 files changed

+67
-137
lines changed

.claude/agents-en/task-decomposer.md

Lines changed: 53 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -97,88 +97,45 @@ Decompose tasks based on implementation strategy patterns determined in @docs/ru
9797

9898
## Task File Template
9999

100-
**Important**: Use checkbox format in all sections to enable progress tracking
101-
102100
```markdown
103101
# Task: [Task Name]
104102

105-
Plan Document: [Original plan document filename]
106-
Overall Design Document: _overview-[plan-name].md
107-
Task Number: [Number]
108-
Task Size: [Small/Medium]
109-
Expected File Count: [1-5]
110-
Estimated Work Time: [Hours]
111-
Dependent Tasks: [Dependent task numbers, "None" if none]
112-
113-
## Position in Overall Context
114-
### Overall Project Purpose
115-
[Overall purpose extracted from work plan]
116-
117-
### This Task's Role
118-
[Role this task plays in achieving overall purpose]
119-
120-
### Relationship with Previous Task
121-
- Previous Task: [Task name or "None"]
122-
- Inherited Information: [Design or implementation inherited from previous task]
123-
124-
### Impact on Subsequent Tasks
125-
- Subsequent Task: [Task name or "None"]
126-
- Provided Information: [Design or implementation passed to subsequent task]
103+
Metadata:
104+
- Dependencies: task-01 → Deliverable: docs/plans/analysis/research-results.md
105+
- Provides: docs/plans/analysis/api-spec.md (for research/design tasks)
106+
- Size: Small (1-2 files)
127107

128-
## Overview
108+
## Implementation Content
129109
[What this task will achieve]
110+
*Reference dependency deliverables if applicable
130111

131112
## Target Files
132-
- [ ] path/to/file1.ts
133-
- [ ] path/to/file2.ts
134-
- [ ] __tests__/file1.test.ts
135-
136-
## Operation Verification Methods【Mandatory】
137-
Verification Level: [Select from L1/L2/L3 - follow implementation-approach.md]
138-
- [ ] Verification Command: `[specific command]`
139-
- [ ] Expected Result: [what should happen for success]
140-
- [ ] Alternative Method if Verification Impossible: [unit tests, etc.]
113+
- [ ] [Implementation file path]
114+
- [ ] [Test file path]
141115

142116
## Implementation Steps (TDD: Red-Green-Refactor)
117+
### 1. Red Phase
118+
- [ ] Review dependency deliverables (if any)
119+
- [ ] Verify/create type definitions
120+
- [ ] Write failing tests
121+
- [ ] Run tests and confirm failure
143122

144-
### 0. **Interface First - Interface Definition**
145-
- [ ] Input type definitions (or verify existing)
146-
- [ ] Output type definitions (or verify existing)
147-
- [ ] Existing compatibility verification (method names, parameters, return values)
148-
149-
### 1. **Red Phase - Write Failing Tests**
150-
- [ ] [Define expected behavior in tests (e.g., `expect(result).toBe(expected)`)]
151-
- [ ] [Run tests and confirm failure (e.g., `npm test -- path/to/test.ts`)]
152-
- [ ] [Create additional test cases as needed (edge cases, etc.)]
153-
154-
### 2. **Green Phase - Minimal Implementation**
155-
- [ ] [Add minimal implementation to make tests pass]
156-
- [ ] [Hardcoding is acceptable (prioritize making it work first)]
157-
- [ ] [Run only added tests and confirm they pass]
123+
### 2. Green Phase
124+
- [ ] Add minimal implementation to pass tests
125+
- [ ] Run only added tests and confirm they pass
158126

159-
### 3. **Refactor Phase - Code Improvement**
160-
- [ ] [Improve code while maintaining passing state of added tests]
161-
- [ ] [Remove duplication, improve readability, appropriate abstraction]
162-
- [ ] [Confirm added tests continue to pass]
127+
### 3. Refactor Phase
128+
- [ ] Improve code (maintain passing tests)
129+
- [ ] Confirm added tests still pass
163130

164131
## Completion Criteria
165-
- [ ] Red Phase: Failing tests created
166-
- [ ] Green Phase: Tests pass with minimal implementation
167-
- [ ] Refactor Phase: Code improved, added tests maintain passing state
168-
- [ ] All added tests pass (overall tests executed in quality assurance process)
169-
- [ ] **Note**: Overall quality assurance and commit creation separately executed in quality assurance process
170-
171-
## Important Notes
172-
### Implementation Considerations
173-
[Technical considerations, consistency with existing design, etc.]
174-
175-
### Impact Scope Control
176-
- Parts that must not be changed in this task: [Explicitly state]
177-
- Areas where impact might propagate: [Items requiring confirmation]
178-
179-
### Common Processing Guidelines
180-
- Processing to be shared with other tasks: [Specify if applicable]
181-
- Checks to avoid redundant implementation: [Checkpoints]
132+
- [ ] All added tests pass
133+
- [ ] Operation verified (select L1/L2/L3, per implementation-approach.md)
134+
- [ ] Deliverables created (for research/design tasks)
135+
136+
## Notes
137+
- Impact scope: [Areas where changes may propagate]
138+
- Constraints: [Areas not to be modified]
182139
```
183140

184141
## Overall Design Document Template
@@ -206,11 +163,11 @@ Target Plan Document: [Plan document filename]
206163

207164
### Inter-task Relationship Map
208165
```
209-
Task 1: Foundation Implementation
210-
(provides type definitions)
211-
Task 2: Feature Implementation
212-
↓ (provides API)
213-
Task 3: Test Addition
166+
Task 1: [Content] → Deliverable: docs/plans/analysis/[filename]
167+
168+
Task 2: [Content] → Deliverable: docs/plans/analysis/[filename]
169+
↓ (references Task 2's deliverable)
170+
Task 3: [Content]
214171
```
215172
216173
### Interface Change Impact Analysis
@@ -268,22 +225,17 @@ Please execute decomposed tasks according to the order.
268225

269226
## Important Considerations
270227

271-
### Pre-decomposition Overall Optimization Check
228+
### Core Principles of Task Decomposition
272229

273-
1. **Common Processing Identification**
274-
- Check for similar processing in multiple tasks
275-
- Implement shareable parts in preceding tasks
276-
- Design for reuse in subsequent tasks
230+
1. **Explicit Deliverable Inheritance**
231+
- Research/verification tasks must generate deliverables
232+
- Subsequent tasks explicitly reference dependency deliverable paths
277233

278-
2. **Pre-analysis of Impact Scope**
279-
- How changes in each task affect others
280-
- Boundary settings to prevent unintended side effects
281-
- Clarify interfaces between tasks
234+
2. **Pre-identify Common Processing**
235+
- Implement shared functionality in earlier tasks to prevent duplication
282236

283-
3. **Redundant Implementation Prevention**
284-
- Don't implement similar features separately
285-
- Confirm reusability of existing code
286-
- Design considering future extensibility
237+
3. **Impact Scope Boundary Setting**
238+
- Clearly define changeable scope for each task
287239

288240
### Basic Considerations for Task Decomposition
289241

@@ -308,6 +260,8 @@ Please execute decomposed tasks according to the order.
308260

309261
## Task Decomposition Checklist
310262

263+
- [ ] Previous task deliverable paths specified in subsequent tasks
264+
- [ ] Deliverable filenames specified for research tasks
311265
- [ ] Common processing identification and shared design
312266
- [ ] Task dependencies and execution order clarification
313267
- [ ] Impact scope and boundaries definition for each task
@@ -318,26 +272,15 @@ Please execute decomposed tasks according to the order.
318272

319273
## Important Task Design Principles
320274

321-
### Task Design Best Practices
322-
- ✅ Task division with clear dependencies (maximize parallel execution possibility)
323-
- ✅ Concrete and verifiable completion criteria (clear standards like "tests pass")
324-
- ✅ Appropriate task size (1-5 files, recommend splitting for 6+ files)
325-
- ✅ Task decomposition after overall design document creation (after grasping overall picture)
326-
- ✅ Identify common processing and prevent duplicate implementation (DRY principle)
327-
- ✅ Clearly define impact scope of each task (prevent unintended side effects)
328-
329-
### Important Task Design Guidelines
330-
331-
**Recommended**:
332-
- Implementation tasks complete with "Red (failing test) + Green (minimal implementation) + Refactor (improvement)"
333-
- Research tasks always create deliverables (reports, design documents, etc.)
334-
- Design where each task completes independently
335-
- Set completion criteria within task executor's responsibility scope
336-
337-
**Avoid**:
338-
- Including quality assurance process in implementation tasks (for responsibility separation)
339-
- Completing research tasks without deliverables (cannot accumulate value)
340-
- Quality checking multiple tasks together (ensure quality in each task)
341-
- Completion criteria beyond executor's responsibility scope (becomes unexecutable)
342-
343-
**Principle**: Implementation tasks up to "Red (failing test) + Green (minimal implementation) + Refactor (improvement) + Added tests passing". Overall quality check → commit separately executed in quality assurance process after each task completion.
275+
### Task Design Principles
276+
277+
**Required**:
278+
- Research tasks generate deliverables
279+
- Implementation tasks follow TDD (Red→Green→Refactor)
280+
- Dependency deliverables explicitly referenced
281+
- Task size 1-5 files (split if 6+)
282+
283+
**Prohibited**:
284+
- Including quality assurance in tasks
285+
- Research tasks without deliverables
286+
- Implicit dependency assumptions

.claude/agents-en/task-executor.md

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Load and follow these rule files before starting:
4242

4343
1. **Task Execution**
4444
- Read and execute task files from `docs/plans/tasks/`
45-
- Understand the overall picture through overall design document (_overview-*.md)
45+
- Review dependency deliverables listed in task "Metadata"
4646
- Meet all completion criteria
4747

4848
2. **Progress Management (3-location synchronized updates)**
@@ -59,10 +59,9 @@ ls docs/plans/tasks/*.md | grep -E "task-[0-9]{2}\.md$" | head -1
5959
```
6060

6161
### 2. Task Analysis
62-
- Complete understanding of task file
63-
- Confirm overall design document (_overview-*.md)
64-
- Grasp impact scope and common processing points
65-
- Check "Existing Codebase Analysis" section in Design Doc
62+
- Extract deliverable paths from "Dependencies" in metadata
63+
- Read deliverable files with Read tool and apply content to implementation
64+
- Understand overall picture via overall design document (_overview-*.md)
6665

6766
### 3. Implementation Execution
6867
#### Pre-implementation Verification (Following @docs/rules/ai-development-guide.md Pattern 5)
@@ -87,11 +86,8 @@ ls docs/plans/tasks/*.md | grep -E "task-[0-9]{2}\.md$" | head -1
8786

8887
## Research Task Deliverables
8988

90-
For research tasks (containing "research" or "analysis"):
91-
92-
1. **Research Results Report**: `docs/plans/tasks/YYYYMMDD-{task-name}-findings.md`
93-
2. **Addition to Overall Design Document**: Document research results and impacts
94-
3. **Update Subsequent Tasks**: As needed
89+
Research/analysis tasks create deliverable files specified in metadata "Provides".
90+
Examples: `docs/plans/analysis/research-results.md`, `docs/plans/analysis/api-spec.md`
9591

9692
## Structured Response Specification
9793

@@ -124,21 +120,12 @@ Report in the following JSON format upon task completion (**without executing qu
124120

125121
## Execution Principles
126122

127-
- **Progress checkbox update**: Always update `[ ]``[x]` using Edit tool upon each action completion
128-
- **Overall design document confirmation**: Required before implementation
129-
- **Complete self-containment**: Execute to the end without asking questions
130-
- **Test-first**: Adhere to Red-Green-Refactor process (follow project test rules)
131-
132-
## Implementation Recommendations
133-
134-
**Recommended**:
135-
- Complete tasks only after meeting all completion criteria (ensures work quality)
136-
- Check overall design document before starting implementation (achieve overall optimization)
137-
- Implement 3-location synchronized updates upon each action completion (ensure progress transparency)
138-
- Create deliverables for research tasks (knowledge accumulation and sharing)
139-
- Follow type system conventions
123+
**Execute**:
124+
- Read dependency deliverables → Apply to implementation
125+
- Update `[ ]``[x]` in task file, work plan, and overall design on each step completion
126+
- Strict TDD adherence (Red→Green→Refactor)
127+
- Create deliverables for research tasks
140128

141-
**Avoid**:
142-
- Executing overall quality checks (npm run check, npm run build, etc.) - Delegate to quality assurance process
143-
- Creating commits (git commit, etc.) - Implemented after quality assurance process
144-
- Ignoring type checks - Compromises type safety
129+
**Do Not Execute**:
130+
- Overall quality checks (delegate to quality assurance process)
131+
- Commit creation (execute after quality checks)

0 commit comments

Comments
 (0)