You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: optimize agent prompts for LLM precision and maintenance
Remove skip information tracking from acceptance-test-generator:
- Remove skip report from test files and generation reports
- Remove skip tracking from mandatory compliance section
- Remove maxSkippedROI from roiMetrics
- Focus only on selected tests to reduce context pollution
Simplify technical-designer AC scoping section:
- Remove verbose 3-check process (duplicated with acceptance-test-generator)
- Remove domain-specific examples (bcrypt, Redis, authentication)
- Use generic, domain-agnostic examples
- Remove upstream/downstream references (violates agent independence)
Unify latest information research guidelines:
- Add Mandatory/Recommended distinction for better decision-making
- Dynamically fetch current year with date command
- Replace hardcoded "2024" with {current_year} placeholder
- Apply to technical-designer and document-reviewer
Benefits:
- Reduced token consumption and context pollution
- Eliminated redundancy between agent files
- Future-proof search queries (no year hardcoding)
- Improved LLM generation precision
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Copy file name to clipboardExpand all lines: .claude/agents-en/acceptance-test-generator.md
+14-95Lines changed: 14 additions & 95 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,12 +39,14 @@ Before starting work, you MUST read and strictly follow these rule files:
39
39
-**Implementation Timing**: Created alongside feature implementation
40
40
41
41
### E2E Tests (End-to-End Tests)
42
-
-**Purpose**: Verify complete user journeys (revenue-critical only)
42
+
-**Purpose**: Verify critical user journeys
43
43
-**Scope**: Full system behavior validation
44
44
-**Generated Files**: `*.e2e.test.ts`
45
45
-**Budget**: MAX 1-2 tests per feature (only if ROI > threshold)
46
46
-**Implementation Timing**: Executed only in final phase after all implementations complete
47
47
48
+
**Critical User Journey Definition**: User flows that are business-essential, including revenue-impacting (payment, checkout), legally required (GDPR, data protection), or high-frequency core functionality (>80% users).
49
+
48
50
## 4-Phase Generation Process
49
51
50
52
### Phase 1: AC Validation (Behavior-First Filtering)
@@ -57,7 +59,7 @@ Before starting work, you MUST read and strictly follow these rule files:
57
59
|**System Context**| Requires full system integration? | Skip |[UNIT_LEVEL]|
58
60
|**Upstream Scope**| In Include list? | Skip |[OUT_OF_SCOPE]|
59
61
60
-
**Upstream AC Scoping** (from technical-designer):
62
+
**AC Include/Exclude Criteria**:
61
63
62
64
**Include** (High automation ROI):
63
65
- Business logic correctness (calculations, state transitions, data transformations)
@@ -73,17 +75,7 @@ Before starting work, you MUST read and strictly follow these rule files:
73
75
74
76
**Principle**: AC = User-observable behavior verifiable in isolated CI environment
75
77
76
-
**Example Filtering**:
77
-
78
-
```
79
-
AC: "Hash passwords using bcrypt with salt rounds=10"
80
-
→ Skip [IMPLEMENTATION_DETAIL] - hashing algorithm not user-observable
81
-
82
-
AC: "After successful payment, user receives order confirmation"
83
-
→ PASS (observable + system-level + in scope)
84
-
```
85
-
86
-
**Output**: Filtered AC list with skip rationale for each excluded AC
78
+
**Output**: Filtered AC list
87
79
88
80
### Phase 2: Candidate Enumeration (Two-Pass #1)
89
81
@@ -153,13 +145,9 @@ ROI Score = (Business Value × User Frequency + Legal Requirement × 10 + Defect
153
145
2. Select top N within budget:
154
146
- Integration: Pick top 3 highest-ROI
155
147
- E2E: Pick top 1-2 IF ROI score > 50
156
-
3. Generate skip report for unselected candidates:
157
-
- Test name
158
-
- ROI score
159
-
- Skip reason (budget exceeded / low ROI / covered by lower-level test)
160
148
```
161
149
162
-
**Output**: Final test set + comprehensive skip report
150
+
**Output**: Final test set
163
151
164
152
## Output Format
165
153
@@ -168,13 +156,12 @@ ROI Score = (Business Value × User Frequency + Legal Requirement × 10 + Defect
168
156
```typescript
169
157
// [Feature Name] Integration Test - Design Doc: [filename]
- UI presentation method (layout, styling) → Focus on information availability
369
328
370
-
**Downstream Impact**:
329
+
**Example**:
330
+
- ❌ Implementation detail: "Data is stored using specific technology X"
331
+
- ✅ Observable behavior: "Saved data can be retrieved after system restart"
371
332
372
-
This scoping is **mandatory for acceptance-test-generator**. Tests are generated only from ACs that pass all 3 checks above, preventing over-generation of low-ROI tests.
373
-
374
-
*Note: Non-functional requirements (performance, reliability, scalability) are defined in the "Non-functional Requirements" section and automatically verified by tools like quality-fixer*
333
+
*Note: Non-functional requirements (performance, reliability, scalability) are defined in "Non-functional Requirements" section*
375
334
376
335
## Latest Information Research Guidelines
377
336
378
-
### Research Timing
379
-
1. **Mandatory Research**:
380
-
- When considering new technology/library introduction
381
-
- When designing performance optimization
382
-
- When designing security-related implementation
383
-
- When major version upgrades of existing technology
384
-
385
-
2. **Recommended Research**:
386
-
- Before implementing complex algorithms
387
-
- When considering improvements to existing patterns
388
-
389
-
### Research Method
390
-
391
337
**Required Research Timing**: New technology introduction, performance optimization, security design, major version upgrades
338
+
**Recommended Research**: Before implementing complex algorithms, when considering improvements to existing patterns
392
339
393
-
**Specific Search Pattern Examples**:
394
-
- `React Server Components best practices 2024`(new feature research)
395
-
- `PostgreSQL vs MongoDB performance comparison 2024`(technology selection)
0 commit comments