mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-07 01:33:31 +08:00
docs: fold stocktake rule guidance into common rules
This commit is contained in:
@@ -27,3 +27,31 @@ MANDATORY workflow:
|
||||
## Agent Support
|
||||
|
||||
- **tdd-guide** - Use PROACTIVELY for new features, enforces write-tests-first
|
||||
|
||||
## Test Structure (AAA Pattern)
|
||||
|
||||
Prefer Arrange-Act-Assert structure for tests:
|
||||
|
||||
```typescript
|
||||
test('calculates similarity correctly', () => {
|
||||
// Arrange
|
||||
const vector1 = [1, 0, 0]
|
||||
const vector2 = [0, 1, 0]
|
||||
|
||||
// Act
|
||||
const similarity = calculateCosineSimilarity(vector1, vector2)
|
||||
|
||||
// Assert
|
||||
expect(similarity).toBe(0)
|
||||
})
|
||||
```
|
||||
|
||||
### Test Naming
|
||||
|
||||
Use descriptive names that explain the behavior under test:
|
||||
|
||||
```typescript
|
||||
test('returns empty array when no markets match query', () => {})
|
||||
test('throws error when API key is missing', () => {})
|
||||
test('falls back to substring search when Redis is unavailable', () => {})
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user