metacoding 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -43
- package/LICENSE +1 -1
- package/lib/services/template-manager.d.ts +3 -0
- package/lib/services/template-manager.d.ts.map +1 -1
- package/lib/services/template-manager.js +126 -9
- package/lib/services/template-manager.js.map +1 -1
- package/lib/services/vscode.js +1 -1
- package/lib/services/vscode.js.map +1 -1
- package/package.json +4 -4
- package/templates/general/code-review.instructions.md +265 -0
- package/templates/general/{files/copilot-instructions.md.template → copilot-instructions.md} +97 -140
- package/templates/{python/files → general}/docs-update.instructions.md +45 -32
- package/templates/general/release.instructions.md +242 -0
- package/templates/general/test-runner.instructions.md +188 -0
- package/templates/node/nodejs.coding.instructions.md +249 -0
- package/templates/node/nodejs.docs.instructions.md +234 -0
- package/templates/node/nodejs.testing.instructions.md +373 -0
- package/templates/python/python.coding.instructions.md +339 -0
- package/templates/python/python.docs.instructions.md +1147 -0
- package/templates/python/python.testing.instructions.md +1074 -0
- package/templates/react/react.coding.instructions.md +695 -0
- package/templates/react/react.docs.instructions.md +427 -0
- package/templates/react/react.testing.instructions.md +193 -0
- package/templates/react/test-runner.instructions.md +135 -0
- package/templates/typescript/template.json +16 -0
- package/templates/typescript/typescript.coding.instructions.md +368 -0
- package/templates/typescript/typescript.docs.instructions.md +734 -0
- package/templates/typescript/typescript.testing.instructions.md +740 -0
- package/templates/general/files/code-review.instructions.md +0 -111
- package/templates/general/files/docs-update.instructions.md +0 -203
- package/templates/general/files/release.instructions.md +0 -72
- package/templates/general/files/test-runner.instructions.md +0 -107
- package/templates/node/files/code-review.instructions.md +0 -222
- package/templates/node/files/copilot-instructions.md.template +0 -391
- package/templates/node/files/docs-update.instructions.md +0 -203
- package/templates/node/files/release.instructions.md +0 -72
- package/templates/node/files/test-runner.instructions.md +0 -108
- package/templates/python/files/code-review.instructions.md +0 -215
- package/templates/python/files/copilot-instructions.md.template +0 -418
- package/templates/python/files/release.instructions.md +0 -72
- package/templates/python/files/test-runner.instructions.md +0 -108
- package/templates/react/files/code-review.instructions.md +0 -160
- package/templates/react/files/copilot-instructions.md.template +0 -472
- package/templates/react/files/docs-update.instructions.md +0 -203
- package/templates/react/files/release.instructions.md +0 -72
- package/templates/react/files/test-runner.instructions.md +0 -108
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 'Guidelines for maintaining project documentation'
|
|
3
|
-
applyTo: '**/*.md'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Documentation Maintenance Guidelines
|
|
7
|
-
|
|
8
|
-
## Documentation Architecture Principles
|
|
9
|
-
|
|
10
|
-
This project enforces a strict distinction between different types of documentation to ensure clarity, maintainability, and appropriate use of status indicators.
|
|
11
|
-
|
|
12
|
-
### System Documentation (Evergreen, Factual)
|
|
13
|
-
|
|
14
|
-
**Purpose:** Describes the current state of the system, architecture, and implemented features.
|
|
15
|
-
**Files:** README.md, architecture.md, api-design.md, system-documentation.md, code documentation
|
|
16
|
-
**Language:** Present tense, factual, descriptive
|
|
17
|
-
**Status Indicators:** ❌ **NEVER use status emojis or temporal language**
|
|
18
|
-
**Content Focus:** What exists now, how it works, what it does
|
|
19
|
-
**Examples:**
|
|
20
|
-
|
|
21
|
-
- ✅ Correct: "The authentication system uses JWT tokens"
|
|
22
|
-
- ❌ Incorrect: "🚧 Authentication system (in progress)"
|
|
23
|
-
- ✅ Correct: "The API supports the following endpoints:"
|
|
24
|
-
- ❌ Incorrect: "📋 Planned API endpoints:"
|
|
25
|
-
|
|
26
|
-
### Project Management Documentation (Temporal, Status-Oriented)
|
|
27
|
-
|
|
28
|
-
**Purpose:** Tracks work progress, planning, and execution status.
|
|
29
|
-
**Files:** project-task-list.md, sprint-planning.md, backlog.md
|
|
30
|
-
**Language:** Status-oriented, temporal references allowed
|
|
31
|
-
**Status Indicators:** ✅ **Required - use emojis and progress indicators**
|
|
32
|
-
**Content Focus:** What needs to be done, work progress, planning
|
|
33
|
-
**Examples:**
|
|
34
|
-
|
|
35
|
-
- ✅ Correct: "🚧 In Progress - Authentication system implementation"
|
|
36
|
-
- ✅ Correct: "✅ Completed - JWT token validation"
|
|
37
|
-
- ✅ Correct: "📋 Backlog - Add OAuth integration"
|
|
38
|
-
|
|
39
|
-
### User Documentation (Instructional, Current)
|
|
40
|
-
|
|
41
|
-
**Purpose:** Helps users understand how to use the system.
|
|
42
|
-
**Files:** Installation guides, usage examples, tutorials
|
|
43
|
-
**Language:** Imperative, instructional, present tense
|
|
44
|
-
**Status Indicators:** ⚠️ **Use sparingly** - only for actual user-facing feature status
|
|
45
|
-
**Content Focus:** How to use, what users can do, step-by-step guidance
|
|
46
|
-
|
|
47
|
-
### Enforcement Rules
|
|
48
|
-
|
|
49
|
-
1. **No Status Emojis in System Documentation:** Architecture, API docs, and README feature descriptions must be purely factual
|
|
50
|
-
2. **No Temporal Language in System Documentation:** Avoid "currently", "recently", "planned", "upcoming" in system docs
|
|
51
|
-
3. **Status Indicators Required in Project Management:** All task lists and project planning docs must use clear status indicators
|
|
52
|
-
4. **Regular Documentation Audits:** Review and remove status language that has crept into system documentation
|
|
53
|
-
5. **Template Compliance:** All generated documentation must follow these principles
|
|
54
|
-
|
|
55
|
-
## Documentation Quality Standards
|
|
56
|
-
|
|
57
|
-
- **Clarity:** Write clear, concise explanations
|
|
58
|
-
- **Completeness:** Ensure documentation covers all necessary aspects
|
|
59
|
-
- **Accuracy:** Verify all information is current and correct
|
|
60
|
-
- **Consistency:** Maintain consistent tone and formatting
|
|
61
|
-
- **Accessibility:** Use clear language and proper formatting for accessibility
|
|
62
|
-
- **Architecture Compliance:** Follow the system vs project documentation distinction
|
|
63
|
-
|
|
64
|
-
## Status Indication Guidelines (For Project Management Documentation Only)
|
|
65
|
-
|
|
66
|
-
**⚠️ IMPORTANT: These guidelines apply ONLY to project management documentation (task lists, planning docs). System documentation (README, architecture, API docs) must NEVER use status indicators.**
|
|
67
|
-
|
|
68
|
-
- **Use checkboxes for task status:** `- [ ]` for incomplete, `- [x]` for complete
|
|
69
|
-
- **Use clear status indicators in project management docs:**
|
|
70
|
-
- ✅ Complete/Implemented
|
|
71
|
-
- 🚧 In Progress
|
|
72
|
-
- ❌ Not Started
|
|
73
|
-
- ⚠️ Needs Review
|
|
74
|
-
- 🔄 Under Revision
|
|
75
|
-
- **Examples of correct project management documentation:**
|
|
76
|
-
- ✅ Good: "🚧 In Progress - User authentication implementation"
|
|
77
|
-
- ✅ Good: "Development Status" with current checkboxes
|
|
78
|
-
- ✅ Good: "✅ Completed - API endpoint testing"
|
|
79
|
-
- **Examples of incorrect system documentation:**
|
|
80
|
-
- ❌ Bad: "🚧 Authentication Features" (in README.md)
|
|
81
|
-
- ❌ Bad: "Authentication system (planned)" (in architecture.md)
|
|
82
|
-
- ❌ Bad: "📋 API Endpoints" (in api-design.md)
|
|
83
|
-
|
|
84
|
-
## Task Management Documentation Guidelines
|
|
85
|
-
|
|
86
|
-
- **Focus on current state:** Document what needs to be done, not what was recently done
|
|
87
|
-
- **Use project phases:** Organize by logical project phases or milestones, not completion status
|
|
88
|
-
- **Move completed work to changelog:** Record completed work in CHANGELOG.md, not in task lists
|
|
89
|
-
- **Keep task lists current:** Update completed items with current status instead of maintaining "completed" sections
|
|
90
|
-
- **Use descriptive section names:** Use functional names like "Core Features", "Infrastructure", "Testing" instead of "Completed Tasks"
|
|
91
|
-
- **Avoid temporal references:** Don't use "Recent", "Latest", "Upcoming" in section headers - they become outdated quickly
|
|
92
|
-
|
|
93
|
-
## README.md Standards (System Documentation)
|
|
94
|
-
|
|
95
|
-
**⚠️ README.md is system documentation - NO status indicators or temporal language allowed**
|
|
96
|
-
|
|
97
|
-
- **Project Overview:** Keep description current with latest capabilities using factual, present-tense language
|
|
98
|
-
- **Installation Instructions:** Verify and update installation steps with clear, current procedures
|
|
99
|
-
- **Usage Examples:** Ensure all code examples are tested and working, describe what they do
|
|
100
|
-
- **Feature Documentation:** Document all major features with examples using factual descriptions
|
|
101
|
-
- **Version Badges:** Keep version badges synchronized with package.json
|
|
102
|
-
- **Links Verification:** Regularly check that all links work correctly
|
|
103
|
-
- **Screenshots/GIFs:** Update visual documentation when UI changes
|
|
104
|
-
- **Avoid Status Language:** Never use "planned", "upcoming", "in progress", or status emojis
|
|
105
|
-
- **Examples:**
|
|
106
|
-
- ✅ Correct: "The CLI provides three commands for project setup"
|
|
107
|
-
- ❌ Incorrect: "🚧 CLI commands (in development)"
|
|
108
|
-
- ✅ Correct: "Authentication uses JWT tokens with refresh capability"
|
|
109
|
-
- ❌ Incorrect: "Authentication system (planned for v2.0)"
|
|
110
|
-
|
|
111
|
-
## CHANGELOG.md Maintenance
|
|
112
|
-
|
|
113
|
-
- **User-Facing Changes:** Document all changes that affect users
|
|
114
|
-
- **Consistent Format:** Follow established changelog format
|
|
115
|
-
- **Categorization:** Group changes appropriately (Added, Changed, Fixed, etc.)
|
|
116
|
-
- **Breaking Changes:** Clearly mark breaking changes
|
|
117
|
-
- **Migration Guides:** Provide migration guidance for breaking changes
|
|
118
|
-
|
|
119
|
-
## Code Documentation
|
|
120
|
-
|
|
121
|
-
- **JSDoc Comments:** Update JSDoc comments when changing public APIs
|
|
122
|
-
- **Inline Comments:** Add comments for complex logic, not obvious code
|
|
123
|
-
- **Function Documentation:** Document parameters, return values, and side effects
|
|
124
|
-
- **Class Documentation:** Explain class purpose, responsibilities, and usage patterns
|
|
125
|
-
- **Type Documentation:** Document complex TypeScript types and interfaces
|
|
126
|
-
|
|
127
|
-
## API Documentation
|
|
128
|
-
|
|
129
|
-
- **Endpoint Documentation:** Keep API endpoint documentation current
|
|
130
|
-
- **Parameter Changes:** Update parameter descriptions for any modifications
|
|
131
|
-
- **Response Examples:** Provide realistic response examples
|
|
132
|
-
- **Error Handling:** Document error responses and status codes
|
|
133
|
-
- **Authentication:** Keep authentication documentation accurate
|
|
134
|
-
|
|
135
|
-
## Architectural Documentation (System Documentation)
|
|
136
|
-
|
|
137
|
-
**⚠️ Architecture docs are system documentation - NO status indicators or temporal language allowed**
|
|
138
|
-
|
|
139
|
-
- **Decision Records:** Record significant architectural decisions in `/meta` folder using factual language
|
|
140
|
-
- **System Overview:** Maintain high-level system architecture documentation describing current implementation
|
|
141
|
-
- **Data Flow:** Document data flow and process workflows as they currently exist
|
|
142
|
-
- **Integration Points:** Document external system integrations that are implemented
|
|
143
|
-
- **Performance Considerations:** Document performance implications of current design decisions
|
|
144
|
-
- **Examples:**
|
|
145
|
-
- ✅ Correct: "The system uses a microservices architecture with three main services"
|
|
146
|
-
- ❌ Incorrect: "🏗️ Microservices architecture (under development)"
|
|
147
|
-
- ✅ Correct: "Data flows through the validation layer before storage"
|
|
148
|
-
- ❌ Incorrect: "Data validation layer (planned implementation)"
|
|
149
|
-
|
|
150
|
-
## Code Examples and Tutorials
|
|
151
|
-
|
|
152
|
-
- **Working Examples:** Ensure all code examples compile and run
|
|
153
|
-
- **Complete Examples:** Provide complete, runnable examples when possible
|
|
154
|
-
- **Progressive Complexity:** Start with simple examples, build to complex ones
|
|
155
|
-
- **Error Handling:** Show proper error handling in examples
|
|
156
|
-
- **Best Practices:** Demonstrate best practices in example code
|
|
157
|
-
|
|
158
|
-
## Test Documentation Standards
|
|
159
|
-
|
|
160
|
-
Follow the standardized table format for all test case documentation:
|
|
161
|
-
|
|
162
|
-
### Required Table Format
|
|
163
|
-
|
|
164
|
-
```markdown
|
|
165
|
-
| Test Case ID | Description | Type | Status |
|
|
166
|
-
| :------------ | :------------------------------------------ | :--- | :-------- |
|
|
167
|
-
| AREA-TYPE-001 | Brief but descriptive test case description | Unit | Completed |
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### Test Case ID Conventions
|
|
171
|
-
|
|
172
|
-
- **Format:** `[AREA]-[TYPE]-[NUMBER]`
|
|
173
|
-
- **Area Prefixes (React/Frontend):** COMP, HOOK, PAGE, STORE, API, UTIL, AUTH, FORM, DOC, E2E, INT
|
|
174
|
-
- **Type Suffixes:** UNIT, INT, E2E
|
|
175
|
-
- **Sequential Numbering:** 001, 002, 003, etc.
|
|
176
|
-
|
|
177
|
-
### Table Organization Requirements
|
|
178
|
-
|
|
179
|
-
- **Functional Grouping:** Group test cases by system area/component
|
|
180
|
-
- **Consistent Formatting:** Maintain proper column alignment using pipes
|
|
181
|
-
- **Clear Headers:** Use descriptive section headers (e.g., "Template System", "CLI Commands")
|
|
182
|
-
- **Status Tracking:** Use simple status values: "Completed", "In Progress", "Not Started"
|
|
183
|
-
|
|
184
|
-
### Documentation Testing
|
|
185
|
-
|
|
186
|
-
- **Link Checking:** Regularly verify all links work
|
|
187
|
-
- **Code Testing:** Test all code examples in documentation
|
|
188
|
-
- **Installation Testing:** Verify installation instructions work in clean environment
|
|
189
|
-
- **User Testing:** Occasionally have someone unfamiliar try following docs
|
|
190
|
-
|
|
191
|
-
## Maintenance Schedule
|
|
192
|
-
|
|
193
|
-
- **Regular Review:** Schedule regular documentation review cycles
|
|
194
|
-
- **Release Updates:** Update documentation as part of release process
|
|
195
|
-
- **Issue Tracking:** Track documentation issues and improvements
|
|
196
|
-
- **Community Feedback:** Incorporate user feedback on documentation clarity
|
|
197
|
-
|
|
198
|
-
## Localization Considerations
|
|
199
|
-
|
|
200
|
-
- **Clear English:** Use clear, simple English for international audiences
|
|
201
|
-
- **Cultural Sensitivity:** Avoid culture-specific references
|
|
202
|
-
- **Technical Terms:** Define technical terms when first introduced
|
|
203
|
-
- **Consistent Terminology:** Use consistent terminology throughout
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Step-by-step release process automation"
|
|
3
|
-
applyTo: "package.json"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Release Process Checklist
|
|
7
|
-
|
|
8
|
-
## Pre-Release Validation
|
|
9
|
-
1. **Test Suite:** Verify all tests pass: `npm test`
|
|
10
|
-
2. **Build Verification:** Ensure clean build without errors: `npm run build`
|
|
11
|
-
3. **Linting:** Check code quality standards: `npm run lint`
|
|
12
|
-
4. **Dependencies:** Review and update dependencies if needed
|
|
13
|
-
5. **Security Audit:** Run security audit: `npm audit`
|
|
14
|
-
|
|
15
|
-
## Version Management
|
|
16
|
-
1. **Semantic Versioning:** Update version in package.json following SemVer:
|
|
17
|
-
- **MAJOR:** Breaking changes (X.0.0)
|
|
18
|
-
- **MINOR:** New features, backward compatible (0.X.0)
|
|
19
|
-
- **PATCH:** Bug fixes, backward compatible (0.0.X)
|
|
20
|
-
2. **Version Consistency:** Ensure version matches across all relevant files
|
|
21
|
-
3. **Breaking Changes:** Document breaking changes prominently in changelog
|
|
22
|
-
|
|
23
|
-
## Documentation Updates
|
|
24
|
-
1. **README.md Updates:**
|
|
25
|
-
- Update version badges to match package.json version
|
|
26
|
-
- Refresh installation instructions if needed
|
|
27
|
-
- Update feature descriptions for new capabilities
|
|
28
|
-
- Verify all links and examples work correctly
|
|
29
|
-
2. **API Documentation:** Update API docs for any interface changes
|
|
30
|
-
|
|
31
|
-
## Changelog Management
|
|
32
|
-
1. **Add New Entry:** Create new section in CHANGELOG.md with:
|
|
33
|
-
- Release version number (matching package.json)
|
|
34
|
-
- Release date in YYYY-MM-DD format
|
|
35
|
-
- Grouped changes by category:
|
|
36
|
-
- **Added:** New features
|
|
37
|
-
- **Changed:** Changes in existing functionality
|
|
38
|
-
- **Deprecated:** Soon-to-be removed features
|
|
39
|
-
- **Removed:** Now removed features
|
|
40
|
-
- **Fixed:** Bug fixes
|
|
41
|
-
- **Security:** Security vulnerability fixes
|
|
42
|
-
2. **Entry Guidelines:**
|
|
43
|
-
- Keep entries brief but descriptive (1-2 lines per change)
|
|
44
|
-
- Focus on user impact rather than technical implementation
|
|
45
|
-
- Reference issue/PR numbers when applicable: `(#123)`
|
|
46
|
-
- Highlight breaking changes with ⚠️ or **BREAKING:**
|
|
47
|
-
|
|
48
|
-
## Git Operations
|
|
49
|
-
1. **Commit Changes:** Stage all release-related changes
|
|
50
|
-
2. **Commit Message:** Use format: `chore: bump version to vX.Y.Z`
|
|
51
|
-
3. **Create Tag:** Tag the commit with version number: `git tag vX.Y.Z`
|
|
52
|
-
4. **Push Changes:** Push commits and tags: `git push && git push --tags`
|
|
53
|
-
|
|
54
|
-
## GitHub Release
|
|
55
|
-
1. **Create Release:** Create GitHub release with tag matching package.json version
|
|
56
|
-
2. **Release Title:** Use format: `vX.Y.Z - [Brief description]`
|
|
57
|
-
3. **Release Notes:**
|
|
58
|
-
- Copy relevant sections from CHANGELOG.md
|
|
59
|
-
- Include installation instructions
|
|
60
|
-
- Highlight major changes and breaking changes
|
|
61
|
-
- Thank contributors if applicable
|
|
62
|
-
|
|
63
|
-
## Post-Release Verification
|
|
64
|
-
1. **Package Registry:** Verify package published correctly (if applicable)
|
|
65
|
-
2. **Installation Test:** Test installation from registry in clean environment
|
|
66
|
-
3. **Documentation Links:** Ensure all documentation links work correctly
|
|
67
|
-
4. **Monitor Issues:** Watch for any immediate issues reported by users
|
|
68
|
-
|
|
69
|
-
## Rollback Plan
|
|
70
|
-
- **Git Revert:** Know how to revert problematic releases
|
|
71
|
-
- **Package Unpublish:** Understand package registry policies for unpublishing
|
|
72
|
-
- **Communication:** Prepare communication strategy for critical issues
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 'Instructions for running and maintaining tests'
|
|
3
|
-
applyTo: 'test/**/*.ts'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Test Execution Guidelines
|
|
7
|
-
|
|
8
|
-
## Pre-Commit Testing
|
|
9
|
-
|
|
10
|
-
- Run all tests before committing changes: `npm test`
|
|
11
|
-
- Ensure tests pass in both development and CI environments
|
|
12
|
-
- Fix failing tests before proceeding with commits
|
|
13
|
-
- Run specific test suites for targeted changes when appropriate
|
|
14
|
-
|
|
15
|
-
## Test Development Standards
|
|
16
|
-
|
|
17
|
-
- **New Features:** Ensure all new features have corresponding unit tests
|
|
18
|
-
- **Test Coverage:** Aim for high coverage of critical functionality paths
|
|
19
|
-
- **Test Documentation:** Follow table format in `test/test-documentation.md` for all test cases
|
|
20
|
-
- **Test Organization:** Group related tests in describe blocks with clear hierarchy
|
|
21
|
-
|
|
22
|
-
## Test Case Documentation Format
|
|
23
|
-
|
|
24
|
-
All test cases must be documented using the standardized table format:
|
|
25
|
-
|
|
26
|
-
```markdown
|
|
27
|
-
| Test Case ID | Description | Type | Status |
|
|
28
|
-
| :------------ | :------------------------------------------ | :--- | :-------- |
|
|
29
|
-
| AREA-TYPE-001 | Brief but descriptive test case description | Unit | Completed |
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Test Case Naming Conventions
|
|
33
|
-
|
|
34
|
-
### Test Case ID Format: `[AREA]-[TYPE]-[NUMBER]`
|
|
35
|
-
|
|
36
|
-
**Area Prefixes (React/Frontend specific):**
|
|
37
|
-
|
|
38
|
-
- `COMP` - React component tests
|
|
39
|
-
- `HOOK` - Custom hooks tests
|
|
40
|
-
- `PAGE` - Page/Route component tests
|
|
41
|
-
- `STORE` - State management tests (Redux/Zustand)
|
|
42
|
-
- `API` - API service layer tests
|
|
43
|
-
- `UTIL` - Utility function tests
|
|
44
|
-
- `AUTH` - Authentication flow tests
|
|
45
|
-
- `FORM` - Form validation tests
|
|
46
|
-
- `DOC` - Documentation Quality tests
|
|
47
|
-
- `E2E` - End-to-End workflow tests
|
|
48
|
-
- `INT` - Integration tests
|
|
49
|
-
|
|
50
|
-
**Type Suffixes:**
|
|
51
|
-
|
|
52
|
-
- `UNIT` - Unit tests
|
|
53
|
-
- `INT` - Integration tests
|
|
54
|
-
- `E2E` - End-to-end tests
|
|
55
|
-
|
|
56
|
-
**Examples:**
|
|
57
|
-
|
|
58
|
-
- `COMP-UNIT-001` - First unit test for React Components
|
|
59
|
-
- `HOOK-UNIT-001` - First unit test for Custom Hooks
|
|
60
|
-
- `API-INT-001` - First integration test for API Services
|
|
61
|
-
- `E2E-WF-001` - First end-to-end workflow test
|
|
62
|
-
|
|
63
|
-
### Test Method Naming
|
|
64
|
-
|
|
65
|
-
- Format: `methodName_scenario_expectedOutcome`
|
|
66
|
-
- Example: `getUserById_userExists_returnsUserObject`
|
|
67
|
-
- Use camelCase for all test method names
|
|
68
|
-
|
|
69
|
-
## Test Data Management
|
|
70
|
-
|
|
71
|
-
- **Fixtures:** Update test fixtures when data structures change
|
|
72
|
-
- **Realistic Data:** Use realistic data in integration tests to catch real-world issues
|
|
73
|
-
- **Mock Strategy:** Mock external dependencies in unit tests for isolation
|
|
74
|
-
- **Test Database:** Use separate test database/environment for integration tests
|
|
75
|
-
- **Temporary File Cleanup:** Clean up all temporary test files, debug outputs, and mock data after test execution
|
|
76
|
-
- **Fixture Organization:** Move reusable test data to `/test/fixtures/` directory for proper organization
|
|
77
|
-
|
|
78
|
-
## Test File Hygiene
|
|
79
|
-
|
|
80
|
-
- **No Orphaned Files:** Remove temporary test files created during debugging or development
|
|
81
|
-
- **Debug Output Cleanup:** Remove console.log statements and debug files before committing
|
|
82
|
-
- **Test Artifact Management:** Ensure test screenshots, logs, and reports are properly managed or cleaned up
|
|
83
|
-
- **Resource Management:** Properly dispose of file handles, database connections, and other test resources
|
|
84
|
-
|
|
85
|
-
## Test Types and Patterns
|
|
86
|
-
|
|
87
|
-
- **Unit Tests:** Test individual functions, methods, and components in isolation
|
|
88
|
-
- **Integration Tests:** Test feature workflows and component interactions
|
|
89
|
-
- **End-to-End Tests:** Test complete user scenarios and workflows
|
|
90
|
-
- **Regression Tests:** Add tests for previously fixed bugs to prevent recurrence
|
|
91
|
-
|
|
92
|
-
## Performance Testing
|
|
93
|
-
|
|
94
|
-
- **Test Execution Speed:** Keep unit tests fast (under 100ms each when possible)
|
|
95
|
-
- **Parallel Execution:** Structure tests to run safely in parallel
|
|
96
|
-
- **Resource Cleanup:** Ensure proper cleanup of test resources and temporary data
|
|
97
|
-
- **Memory Management:** Monitor and prevent memory leaks in long-running test suites
|
|
98
|
-
|
|
99
|
-
## Test Maintenance
|
|
100
|
-
|
|
101
|
-
- **Regular Review:** Periodically review and refactor outdated tests
|
|
102
|
-
- **Documentation:** Document complex test scenarios and their purposes
|
|
103
|
-
- **Continuous Updates:** Update tests when requirements or APIs change
|
|
104
|
-
- **Test Quality:** Apply the same code quality standards to test code as production code
|
|
105
|
-
- **Update test-documentation.md:** Add new test cases to the appropriate table section
|
|
106
|
-
- **Status Tracking:** Update test status as development progresses
|
|
107
|
-
- **Table Format:** Maintain consistent table formatting and column alignment
|
|
108
|
-
- **ID Assignment:** Assign sequential IDs within each area (AREA-TYPE-001, AREA-TYPE-002, etc.)
|