metacoding 1.0.0 → 1.1.1
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 +79 -42
- package/LICENSE +1 -1
- package/lib/commands/init.d.ts.map +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/init.js.map +1 -1
- package/lib/services/template-manager.d.ts +4 -1
- package/lib/services/template-manager.d.ts.map +1 -1
- package/lib/services/template-manager.js +129 -10
- 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 +12 -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,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: '
|
|
2
|
+
description: 'Universal documentation maintenance guidelines for all project types'
|
|
3
3
|
applyTo: '**/*.md'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Documentation Maintenance Guidelines
|
|
6
|
+
# Universal Documentation Maintenance Guidelines
|
|
7
7
|
|
|
8
8
|
## Documentation Architecture Principles
|
|
9
9
|
|
|
10
|
-
This project enforces a strict distinction between different types of documentation to ensure clarity, maintainability, and appropriate use of status indicators.
|
|
10
|
+
This project enforces a strict distinction between different types of documentation to ensure clarity, maintainability, and appropriate use of status indicators across all project types.
|
|
11
11
|
|
|
12
12
|
### System Documentation (Evergreen, Factual)
|
|
13
13
|
|
|
@@ -54,10 +54,10 @@ This project enforces a strict distinction between different types of documentat
|
|
|
54
54
|
|
|
55
55
|
## Documentation Quality Standards
|
|
56
56
|
|
|
57
|
-
- **Clarity:** Write clear, concise explanations
|
|
58
|
-
- **Completeness:** Ensure documentation covers all necessary aspects
|
|
57
|
+
- **Clarity:** Write clear, concise explanations appropriate for the target audience
|
|
58
|
+
- **Completeness:** Ensure documentation covers all necessary aspects of the project
|
|
59
59
|
- **Accuracy:** Verify all information is current and correct
|
|
60
|
-
- **Consistency:** Maintain consistent tone and formatting
|
|
60
|
+
- **Consistency:** Maintain consistent tone and formatting across all documentation
|
|
61
61
|
- **Accessibility:** Use clear language and proper formatting for accessibility
|
|
62
62
|
- **Architecture Compliance:** Follow the system vs project documentation distinction
|
|
63
63
|
|
|
@@ -76,10 +76,6 @@ This project enforces a strict distinction between different types of documentat
|
|
|
76
76
|
- ✅ Good: "🚧 In Progress - User authentication implementation"
|
|
77
77
|
- ✅ Good: "Development Status" with current checkboxes
|
|
78
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
79
|
|
|
84
80
|
## Task Management Documentation Guidelines
|
|
85
81
|
|
|
@@ -98,7 +94,7 @@ This project enforces a strict distinction between different types of documentat
|
|
|
98
94
|
- **Installation Instructions:** Verify and update installation steps with clear, current procedures
|
|
99
95
|
- **Usage Examples:** Ensure all code examples are tested and working, describe what they do
|
|
100
96
|
- **Feature Documentation:** Document all major features with examples using factual descriptions
|
|
101
|
-
- **Version Badges:** Keep version badges synchronized with package.json
|
|
97
|
+
- **Version Badges:** Keep version badges synchronized with package.json (or equivalent for other languages)
|
|
102
98
|
- **Links Verification:** Regularly check that all links work correctly
|
|
103
99
|
- **Screenshots/GIFs:** Update visual documentation when UI changes
|
|
104
100
|
- **Avoid Status Language:** Never use "planned", "upcoming", "in progress", or status emojis
|
|
@@ -111,32 +107,42 @@ This project enforces a strict distinction between different types of documentat
|
|
|
111
107
|
## CHANGELOG.md Maintenance
|
|
112
108
|
|
|
113
109
|
- **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.)
|
|
110
|
+
- **Consistent Format:** Follow established changelog format (Keep a Changelog standard)
|
|
111
|
+
- **Categorization:** Group changes appropriately (Added, Changed, Fixed, Security, etc.)
|
|
116
112
|
- **Breaking Changes:** Clearly mark breaking changes
|
|
117
113
|
- **Migration Guides:** Provide migration guidance for breaking changes
|
|
114
|
+
- **Version Dating:** Include release dates in consistent format (YYYY-MM-DD)
|
|
118
115
|
|
|
119
|
-
## Code Documentation
|
|
116
|
+
## Code Documentation Standards
|
|
120
117
|
|
|
121
|
-
-
|
|
122
|
-
|
|
118
|
+
Refer to language-specific coding instruction files for detailed code documentation standards:
|
|
119
|
+
|
|
120
|
+
- **TypeScript/Node.js:** See `typescript.coding.instructions.md` for JSDoc standards
|
|
121
|
+
- **Python:** See `python.coding.instructions.md` for docstring standards
|
|
122
|
+
- **React/Frontend:** See `react.coding.instructions.md` for component documentation
|
|
123
|
+
|
|
124
|
+
### Universal Code Documentation Principles
|
|
125
|
+
|
|
126
|
+
- **Public APIs:** Always document public interfaces with appropriate documentation format
|
|
127
|
+
- **Complex Logic:** Add comments for complex algorithms or business logic
|
|
123
128
|
- **Function Documentation:** Document parameters, return values, and side effects
|
|
124
|
-
- **
|
|
125
|
-
- **
|
|
129
|
+
- **Error Conditions:** Document when and why functions might fail
|
|
130
|
+
- **Usage Examples:** Provide examples for non-trivial usage patterns
|
|
126
131
|
|
|
127
132
|
## API Documentation
|
|
128
133
|
|
|
129
|
-
- **Endpoint Documentation:** Keep API endpoint documentation current
|
|
134
|
+
- **Endpoint Documentation:** Keep API endpoint documentation current with implementation
|
|
130
135
|
- **Parameter Changes:** Update parameter descriptions for any modifications
|
|
131
136
|
- **Response Examples:** Provide realistic response examples
|
|
132
137
|
- **Error Handling:** Document error responses and status codes
|
|
133
138
|
- **Authentication:** Keep authentication documentation accurate
|
|
139
|
+
- **Versioning:** Document API versioning strategy and compatibility
|
|
134
140
|
|
|
135
141
|
## Architectural Documentation (System Documentation)
|
|
136
142
|
|
|
137
143
|
**⚠️ Architecture docs are system documentation - NO status indicators or temporal language allowed**
|
|
138
144
|
|
|
139
|
-
- **Decision Records:** Record significant architectural decisions in `/
|
|
145
|
+
- **Decision Records:** Record significant architectural decisions in `/_meta` folder using factual language
|
|
140
146
|
- **System Overview:** Maintain high-level system architecture documentation describing current implementation
|
|
141
147
|
- **Data Flow:** Document data flow and process workflows as they currently exist
|
|
142
148
|
- **Integration Points:** Document external system integrations that are implemented
|
|
@@ -149,15 +155,16 @@ This project enforces a strict distinction between different types of documentat
|
|
|
149
155
|
|
|
150
156
|
## Code Examples and Tutorials
|
|
151
157
|
|
|
152
|
-
- **Working Examples:** Ensure all code examples compile and run
|
|
158
|
+
- **Working Examples:** Ensure all code examples compile and run in the target language
|
|
153
159
|
- **Complete Examples:** Provide complete, runnable examples when possible
|
|
154
160
|
- **Progressive Complexity:** Start with simple examples, build to complex ones
|
|
155
|
-
- **Error Handling:** Show proper error handling
|
|
161
|
+
- **Error Handling:** Show proper error handling patterns for the language
|
|
156
162
|
- **Best Practices:** Demonstrate best practices in example code
|
|
163
|
+
- **Language Appropriateness:** Use idiomatic patterns for each language
|
|
157
164
|
|
|
158
165
|
## Test Documentation Standards
|
|
159
166
|
|
|
160
|
-
Follow the standardized table format for all test case documentation:
|
|
167
|
+
Follow the standardized table format for all test case documentation across all project types:
|
|
161
168
|
|
|
162
169
|
### Required Table Format
|
|
163
170
|
|
|
@@ -170,7 +177,7 @@ Follow the standardized table format for all test case documentation:
|
|
|
170
177
|
### Test Case ID Conventions
|
|
171
178
|
|
|
172
179
|
- **Format:** `[AREA]-[TYPE]-[NUMBER]`
|
|
173
|
-
- **Area Prefixes (
|
|
180
|
+
- **Area Prefixes:** Adapt to your project (CORE, API, UI, DB, AUTH, UTIL, CONFIG, DOC, etc.)
|
|
174
181
|
- **Type Suffixes:** UNIT, INT, E2E
|
|
175
182
|
- **Sequential Numbering:** 001, 002, 003, etc.
|
|
176
183
|
|
|
@@ -178,15 +185,18 @@ Follow the standardized table format for all test case documentation:
|
|
|
178
185
|
|
|
179
186
|
- **Functional Grouping:** Group test cases by system area/component
|
|
180
187
|
- **Consistent Formatting:** Maintain proper column alignment using pipes
|
|
181
|
-
- **Clear Headers:** Use descriptive section headers
|
|
188
|
+
- **Clear Headers:** Use descriptive section headers for test groups
|
|
182
189
|
- **Status Tracking:** Use simple status values: "Completed", "In Progress", "Not Started"
|
|
190
|
+
- **Descriptive Test Cases:** Provide clear, concise descriptions for each test case
|
|
191
|
+
- **Text only** Don't use emojis or bold text in the table - keep it simple and readable
|
|
183
192
|
|
|
184
|
-
|
|
193
|
+
## Documentation Testing
|
|
185
194
|
|
|
186
|
-
- **Link Checking:** Regularly verify all links work
|
|
187
|
-
- **Code Testing:** Test all code examples in documentation
|
|
195
|
+
- **Link Checking:** Regularly verify all links work across all documentation
|
|
196
|
+
- **Code Testing:** Test all code examples in documentation using appropriate tools
|
|
188
197
|
- **Installation Testing:** Verify installation instructions work in clean environment
|
|
189
|
-
- **User Testing:** Occasionally have someone unfamiliar try following
|
|
198
|
+
- **User Testing:** Occasionally have someone unfamiliar try following documentation
|
|
199
|
+
- **Cross-Platform Testing:** Verify instructions work across supported platforms
|
|
190
200
|
|
|
191
201
|
## Maintenance Schedule
|
|
192
202
|
|
|
@@ -194,10 +204,13 @@ Follow the standardized table format for all test case documentation:
|
|
|
194
204
|
- **Release Updates:** Update documentation as part of release process
|
|
195
205
|
- **Issue Tracking:** Track documentation issues and improvements
|
|
196
206
|
- **Community Feedback:** Incorporate user feedback on documentation clarity
|
|
207
|
+
- **Automated Checks:** Use automated tools to check for broken links and outdated content
|
|
197
208
|
|
|
198
|
-
## Localization
|
|
209
|
+
## Localization and Accessibility
|
|
199
210
|
|
|
200
|
-
- **Clear
|
|
211
|
+
- **Clear Language:** Use clear, simple language for international audiences
|
|
201
212
|
- **Cultural Sensitivity:** Avoid culture-specific references
|
|
202
213
|
- **Technical Terms:** Define technical terms when first introduced
|
|
203
|
-
- **Consistent Terminology:** Use consistent terminology throughout
|
|
214
|
+
- **Consistent Terminology:** Use consistent terminology throughout all documentation
|
|
215
|
+
- **Screen Reader Compatibility:** Ensure proper heading hierarchy and alt text
|
|
216
|
+
- **High Contrast:** Use sufficient color contrast for accessibility
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Universal release process for all project types'
|
|
3
|
+
applyTo: 'package.json,setup.py,pyproject.toml,Cargo.toml'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Universal Release Process Guidelines
|
|
7
|
+
|
|
8
|
+
## Pre-Release Validation
|
|
9
|
+
|
|
10
|
+
### Code Quality Verification
|
|
11
|
+
|
|
12
|
+
1. **Test Suite:** Verify all tests pass using project-appropriate test runner
|
|
13
|
+
2. **Build Verification:** Ensure clean build without errors using project build system
|
|
14
|
+
3. **Linting:** Check code quality standards using project linter configuration
|
|
15
|
+
4. **Dependencies:** Review and update dependencies if needed
|
|
16
|
+
5. **Security Audit:** Run security audit using language-appropriate tools
|
|
17
|
+
|
|
18
|
+
### Language-Specific Pre-Release Steps
|
|
19
|
+
|
|
20
|
+
For detailed language-specific release steps, refer to:
|
|
21
|
+
|
|
22
|
+
- **TypeScript/Node.js:** `npm test`, `npm run build`, `npm audit`
|
|
23
|
+
- **Python:** `pytest`, `python -m build`, `pip-audit` or `safety check`
|
|
24
|
+
- **React/Frontend:** `npm test`, `npm run build`, `npm run lint`
|
|
25
|
+
|
|
26
|
+
## Version Management
|
|
27
|
+
|
|
28
|
+
### Semantic Versioning
|
|
29
|
+
|
|
30
|
+
Follow SemVer (Semantic Versioning) principles across all project types:
|
|
31
|
+
|
|
32
|
+
- **MAJOR (X.0.0):** Breaking changes that require user action
|
|
33
|
+
- **MINOR (0.X.0):** New features that are backward compatible
|
|
34
|
+
- **PATCH (0.0.X):** Bug fixes that are backward compatible
|
|
35
|
+
|
|
36
|
+
### Version Consistency
|
|
37
|
+
|
|
38
|
+
1. **Primary Version File:** Update version in main project file:
|
|
39
|
+
- Node.js: `package.json`
|
|
40
|
+
- Python: `setup.py`, `pyproject.toml`, or `__version__.py`
|
|
41
|
+
- Rust: `Cargo.toml`
|
|
42
|
+
- Other languages: Follow language conventions
|
|
43
|
+
2. **Cross-File Consistency:** Ensure version matches across all relevant files
|
|
44
|
+
3. **Breaking Changes:** Document breaking changes prominently in changelog
|
|
45
|
+
|
|
46
|
+
## Documentation Updates
|
|
47
|
+
|
|
48
|
+
### README.md Updates
|
|
49
|
+
|
|
50
|
+
1. **Version Badges:** Update version badges to match project version
|
|
51
|
+
2. **Installation Instructions:** Refresh installation instructions if needed
|
|
52
|
+
3. **Feature Descriptions:** Update feature descriptions for new capabilities
|
|
53
|
+
4. **Link Verification:** Verify all links and examples work correctly
|
|
54
|
+
5. **Language-Specific Updates:** Update language-specific installation commands
|
|
55
|
+
|
|
56
|
+
### API Documentation
|
|
57
|
+
|
|
58
|
+
- **Interface Changes:** Update API documentation for any interface changes
|
|
59
|
+
- **Compatibility Notes:** Document backward compatibility information
|
|
60
|
+
- **Migration Guides:** Provide migration guidance for breaking changes
|
|
61
|
+
|
|
62
|
+
## Changelog Management
|
|
63
|
+
|
|
64
|
+
### Entry Structure
|
|
65
|
+
|
|
66
|
+
Create new section in CHANGELOG.md with:
|
|
67
|
+
|
|
68
|
+
1. **Release Header:** Version number matching project version file
|
|
69
|
+
2. **Release Date:** Date in YYYY-MM-DD format
|
|
70
|
+
3. **Grouped Changes:** Organize by standard categories:
|
|
71
|
+
- **Added:** New features
|
|
72
|
+
- **Changed:** Changes in existing functionality
|
|
73
|
+
- **Deprecated:** Soon-to-be removed features
|
|
74
|
+
- **Removed:** Now removed features
|
|
75
|
+
- **Fixed:** Bug fixes
|
|
76
|
+
- **Security:** Security vulnerability fixes
|
|
77
|
+
|
|
78
|
+
### Entry Guidelines
|
|
79
|
+
|
|
80
|
+
- **User Impact Focus:** Write from user perspective, not technical implementation
|
|
81
|
+
- **Descriptive but Brief:** 1-2 lines per change explaining user impact
|
|
82
|
+
- **Issue References:** Include issue/PR numbers when applicable: `(#123)`
|
|
83
|
+
- **Breaking Changes:** Highlight with ⚠️ or **BREAKING:** prefix
|
|
84
|
+
- **Migration Information:** Include migration steps for breaking changes
|
|
85
|
+
|
|
86
|
+
## Git Operations
|
|
87
|
+
|
|
88
|
+
### Commit and Tagging
|
|
89
|
+
|
|
90
|
+
1. **Stage Changes:** Add all release-related changes (version files, changelog, docs)
|
|
91
|
+
2. **Commit Message:** Use consistent format: `chore: bump version to vX.Y.Z`
|
|
92
|
+
3. **Create Tag:** Tag the commit with version:
|
|
93
|
+
- Git: `git tag vX.Y.Z`
|
|
94
|
+
- Follow project conventions for tag naming
|
|
95
|
+
4. **Push Changes:** Push commits and tags: `git push && git push --tags`
|
|
96
|
+
|
|
97
|
+
### Branch Management
|
|
98
|
+
|
|
99
|
+
- **Release Branches:** Use release branches for complex release processes
|
|
100
|
+
- **Hotfix Handling:** Follow established branching strategy for hotfixes
|
|
101
|
+
- **Merge Strategy:** Use consistent merge strategy (merge commits vs. squash)
|
|
102
|
+
|
|
103
|
+
## Platform-Specific Release Steps
|
|
104
|
+
|
|
105
|
+
### Package Registry Publishing
|
|
106
|
+
|
|
107
|
+
**Node.js/npm:**
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npm publish
|
|
111
|
+
# Or for scoped packages: npm publish --access public
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Python/PyPI:**
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
python -m build
|
|
118
|
+
twine upload dist/*
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**GitHub Releases:**
|
|
122
|
+
|
|
123
|
+
1. **Create Release:** Create GitHub release with tag matching project version
|
|
124
|
+
2. **Release Title:** Use format: `vX.Y.Z - [Brief description]`
|
|
125
|
+
3. **Release Notes:** Copy relevant sections from CHANGELOG.md
|
|
126
|
+
4. **Asset Uploads:** Include built artifacts if applicable
|
|
127
|
+
|
|
128
|
+
### Registry-Specific Considerations
|
|
129
|
+
|
|
130
|
+
- **Package Validation:** Verify package content before publishing
|
|
131
|
+
- **Permissions:** Ensure proper publishing permissions are configured
|
|
132
|
+
- **Registry Status:** Check target registry availability before publishing
|
|
133
|
+
|
|
134
|
+
## Post-Release Verification
|
|
135
|
+
|
|
136
|
+
### Publication Verification
|
|
137
|
+
|
|
138
|
+
1. **Registry Confirmation:** Verify package published correctly to target registry
|
|
139
|
+
2. **Installation Test:** Test installation from registry in clean environment
|
|
140
|
+
3. **Version Verification:** Confirm published version matches expected version
|
|
141
|
+
4. **Metadata Check:** Verify package metadata is correct
|
|
142
|
+
|
|
143
|
+
### Documentation and Communication
|
|
144
|
+
|
|
145
|
+
1. **Documentation Links:** Ensure all documentation links work correctly
|
|
146
|
+
2. **Update Notifications:** Notify relevant stakeholders of release
|
|
147
|
+
3. **Community Communication:** Post to relevant community channels if applicable
|
|
148
|
+
4. **Monitor Issues:** Watch for immediate issues reported by users
|
|
149
|
+
|
|
150
|
+
## Release Monitoring
|
|
151
|
+
|
|
152
|
+
### Immediate Post-Release
|
|
153
|
+
|
|
154
|
+
- **Download/Install Metrics:** Monitor initial adoption metrics
|
|
155
|
+
- **Error Monitoring:** Watch for error reports from new version
|
|
156
|
+
- **User Feedback:** Monitor support channels for user feedback
|
|
157
|
+
- **Dependency Issues:** Watch for reports of dependency conflicts
|
|
158
|
+
|
|
159
|
+
### Issue Response
|
|
160
|
+
|
|
161
|
+
- **Rapid Response:** Establish process for rapid response to critical issues
|
|
162
|
+
- **Hotfix Process:** Have clear process for emergency hotfixes
|
|
163
|
+
- **Communication Plan:** Prepare communication strategy for critical issues
|
|
164
|
+
- **Rollback Preparedness:** Know how to rollback if necessary
|
|
165
|
+
|
|
166
|
+
## Rollback and Emergency Procedures
|
|
167
|
+
|
|
168
|
+
### Rollback Planning
|
|
169
|
+
|
|
170
|
+
- **Git Revert:** Know how to revert problematic releases
|
|
171
|
+
- **Registry Management:** Understand registry policies for unpublishing
|
|
172
|
+
- **User Communication:** Prepare communication strategy for rollbacks
|
|
173
|
+
- **Data Migration:** Plan for any data migration rollbacks if applicable
|
|
174
|
+
|
|
175
|
+
### Emergency Release Process
|
|
176
|
+
|
|
177
|
+
- **Hotfix Workflow:** Streamlined process for critical security fixes
|
|
178
|
+
- **Testing Requirements:** Minimum testing requirements for emergency releases
|
|
179
|
+
- **Approval Process:** Expedited approval process for critical fixes
|
|
180
|
+
- **Communication Protocol:** Emergency communication procedures
|
|
181
|
+
|
|
182
|
+
## Release Automation
|
|
183
|
+
|
|
184
|
+
### CI/CD Integration
|
|
185
|
+
|
|
186
|
+
- **Automated Testing:** All tests must pass before release
|
|
187
|
+
- **Automated Building:** Automated build process for release artifacts
|
|
188
|
+
- **Automated Publishing:** Consider automated publishing for appropriate project types
|
|
189
|
+
- **Release Notes Generation:** Automate generation of release notes from changelog
|
|
190
|
+
|
|
191
|
+
### Quality Gates
|
|
192
|
+
|
|
193
|
+
- **Test Coverage:** Minimum test coverage requirements
|
|
194
|
+
- **Security Scanning:** Automated security vulnerability scanning
|
|
195
|
+
- **Dependency Auditing:** Automated dependency security auditing
|
|
196
|
+
- **Performance Benchmarks:** Performance regression testing
|
|
197
|
+
|
|
198
|
+
## Multi-Language Project Considerations
|
|
199
|
+
|
|
200
|
+
### Coordinated Releases
|
|
201
|
+
|
|
202
|
+
- **Version Synchronization:** Keep versions synchronized across language components
|
|
203
|
+
- **Testing Integration:** Test all language components together
|
|
204
|
+
- **Documentation Coordination:** Ensure documentation covers all language components
|
|
205
|
+
- **Compatibility Matrix:** Document compatibility between different language versions
|
|
206
|
+
|
|
207
|
+
### Release Coordination
|
|
208
|
+
|
|
209
|
+
- **Release Orchestration:** Coordinate release timing across components
|
|
210
|
+
- **Dependency Management:** Manage dependencies between language components
|
|
211
|
+
- **Testing Strategy:** Test integration between language components
|
|
212
|
+
- **Communication:** Coordinate communication across different language communities
|
|
213
|
+
|
|
214
|
+
## Compliance and Legal
|
|
215
|
+
|
|
216
|
+
### License Compliance
|
|
217
|
+
|
|
218
|
+
- **License Verification:** Ensure all dependencies comply with project license
|
|
219
|
+
- **License Updates:** Update license information for new dependencies
|
|
220
|
+
- **Attribution:** Provide proper attribution for third-party components
|
|
221
|
+
|
|
222
|
+
### Security and Privacy
|
|
223
|
+
|
|
224
|
+
- **Security Review:** Review security implications of changes
|
|
225
|
+
- **Privacy Impact:** Assess privacy impact of new features
|
|
226
|
+
- **Compliance Requirements:** Meet relevant compliance requirements (GDPR, HIPAA, etc.)
|
|
227
|
+
|
|
228
|
+
## Release Metrics and Analytics
|
|
229
|
+
|
|
230
|
+
### Success Metrics
|
|
231
|
+
|
|
232
|
+
- **Adoption Rate:** Track adoption of new version
|
|
233
|
+
- **Error Rate:** Monitor error rates in new version
|
|
234
|
+
- **Performance Metrics:** Track performance of new version
|
|
235
|
+
- **User Satisfaction:** Gather user feedback on new features
|
|
236
|
+
|
|
237
|
+
### Continuous Improvement
|
|
238
|
+
|
|
239
|
+
- **Release Retrospectives:** Conduct retrospectives after major releases
|
|
240
|
+
- **Process Refinement:** Continuously improve release process
|
|
241
|
+
- **Tool Evaluation:** Regularly evaluate and improve release tooling
|
|
242
|
+
- **Documentation Updates:** Keep release documentation current with process changes
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Universal testing guidelines and workflow for all project types'
|
|
3
|
+
applyTo: 'test/**/*'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Universal Test Execution Guidelines
|
|
7
|
+
|
|
8
|
+
## Pre-Commit Testing Workflow
|
|
9
|
+
|
|
10
|
+
- **Run all tests before committing changes:** Use project-appropriate test command
|
|
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
|
+
- **Verify test coverage meets project standards**
|
|
15
|
+
|
|
16
|
+
## Test Development Standards
|
|
17
|
+
|
|
18
|
+
- **New Features:** Ensure all new features have corresponding unit tests
|
|
19
|
+
- **Test Coverage:** Aim for high coverage of critical functionality paths
|
|
20
|
+
- **Test Documentation:** Follow standardized table format in `test/test-documentation.md` for all test cases
|
|
21
|
+
- **Test Organization:** Group related tests with clear hierarchy and descriptive names
|
|
22
|
+
- **Language-Specific Patterns:** Follow testing patterns appropriate for the project language
|
|
23
|
+
|
|
24
|
+
## Language-Specific Testing Guidelines
|
|
25
|
+
|
|
26
|
+
For detailed testing frameworks and patterns, refer to language-specific instruction files:
|
|
27
|
+
|
|
28
|
+
- **TypeScript/Node.js:** See `typescript.coding.instructions.md` for Jest patterns and best practices
|
|
29
|
+
- **Python:** See `python.coding.instructions.md` for pytest patterns and fixtures
|
|
30
|
+
- **React/Frontend:** See `react.coding.instructions.md` for React Testing Library and component testing
|
|
31
|
+
|
|
32
|
+
## Test Case Documentation Format
|
|
33
|
+
|
|
34
|
+
All test cases must be documented using the standardized table format across all project types:
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
| Test Case ID | Description | Type | Status |
|
|
38
|
+
| :------------ | :------------------------------------------ | :--- | :-------- |
|
|
39
|
+
| AREA-TYPE-001 | Brief but descriptive test case description | Unit | Completed |
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Universal Test Case Naming Conventions
|
|
43
|
+
|
|
44
|
+
### Test Case ID Format: `[AREA]-[TYPE]-[NUMBER]`
|
|
45
|
+
|
|
46
|
+
**Area Prefixes (adapt to your project):**
|
|
47
|
+
|
|
48
|
+
- `CORE` - Core application logic tests
|
|
49
|
+
- `API` - API/Service layer tests
|
|
50
|
+
- `UI` - User interface component tests
|
|
51
|
+
- `DB` - Database/Data layer tests
|
|
52
|
+
- `AUTH` - Authentication/Authorization tests
|
|
53
|
+
- `UTIL` - Utility function tests
|
|
54
|
+
- `CONFIG` - Configuration management tests
|
|
55
|
+
- `DOC` - Documentation Quality tests
|
|
56
|
+
- `E2E` - End-to-End workflow tests
|
|
57
|
+
- `INT` - Integration tests
|
|
58
|
+
|
|
59
|
+
**Type Suffixes:**
|
|
60
|
+
|
|
61
|
+
- `UNIT` - Unit tests (isolated component testing)
|
|
62
|
+
- `INT` - Integration tests (component interaction testing)
|
|
63
|
+
- `E2E` - End-to-end tests (full workflow testing)
|
|
64
|
+
|
|
65
|
+
**Examples:**
|
|
66
|
+
|
|
67
|
+
- `CORE-UNIT-001` - First unit test for Core Logic
|
|
68
|
+
- `API-UNIT-001` - First unit test for API Layer
|
|
69
|
+
- `DB-INT-001` - First integration test for Database
|
|
70
|
+
- `E2E-WF-001` - First end-to-end workflow test
|
|
71
|
+
|
|
72
|
+
### Test Method Naming
|
|
73
|
+
|
|
74
|
+
Use language-appropriate naming conventions:
|
|
75
|
+
|
|
76
|
+
- **TypeScript/JavaScript:** `methodName_scenario_expectedOutcome`
|
|
77
|
+
- **Python:** `test_method_name_scenario_expected_outcome`
|
|
78
|
+
- **Consistent Pattern:** Always include what's being tested, the scenario, and expected result
|
|
79
|
+
|
|
80
|
+
## Test Data Management
|
|
81
|
+
|
|
82
|
+
- **Fixtures:** Update test fixtures when data structures change
|
|
83
|
+
- **Realistic Data:** Use realistic data in integration tests to catch real-world issues
|
|
84
|
+
- **Mock Strategy:** Mock external dependencies in unit tests for isolation
|
|
85
|
+
- **Test Environment:** Use separate test environment/database for integration tests
|
|
86
|
+
- **Temporary File Cleanup:** Clean up all temporary test files, debug outputs, and mock data after test execution
|
|
87
|
+
- **Fixture Organization:** Move reusable test data to `/test/fixtures/` directory for proper organization
|
|
88
|
+
|
|
89
|
+
## Test File Hygiene
|
|
90
|
+
|
|
91
|
+
- **No Orphaned Files:** Remove temporary test files created during debugging or development
|
|
92
|
+
- **Debug Output Cleanup:** Remove console output statements and debug files before committing
|
|
93
|
+
- **Test Artifact Management:** Ensure test screenshots, logs, and reports are properly managed or cleaned up
|
|
94
|
+
- **Resource Management:** Properly dispose of file handles, database connections, and other test resources
|
|
95
|
+
- **Documentation Updates:** Remove temporary test documentation and move useful content to proper locations
|
|
96
|
+
|
|
97
|
+
## Test Types and Patterns
|
|
98
|
+
|
|
99
|
+
### Unit Tests
|
|
100
|
+
|
|
101
|
+
- **Purpose:** Test individual functions, methods, and components in isolation
|
|
102
|
+
- **Scope:** Single unit of functionality
|
|
103
|
+
- **Dependencies:** Mock all external dependencies
|
|
104
|
+
- **Speed:** Fast execution (milliseconds per test)
|
|
105
|
+
- **Coverage:** Focus on logic branches and edge cases
|
|
106
|
+
|
|
107
|
+
### Integration Tests
|
|
108
|
+
|
|
109
|
+
- **Purpose:** Test feature workflows and component interactions
|
|
110
|
+
- **Scope:** Multiple components working together
|
|
111
|
+
- **Dependencies:** Use real implementations where practical
|
|
112
|
+
- **Speed:** Moderate execution time
|
|
113
|
+
- **Coverage:** Focus on interface contracts and data flow
|
|
114
|
+
|
|
115
|
+
### End-to-End Tests
|
|
116
|
+
|
|
117
|
+
- **Purpose:** Test complete user scenarios and workflows
|
|
118
|
+
- **Scope:** Full application stack
|
|
119
|
+
- **Dependencies:** Real or production-like environment
|
|
120
|
+
- **Speed:** Slower execution time
|
|
121
|
+
- **Coverage:** Focus on user journeys and critical paths
|
|
122
|
+
|
|
123
|
+
## Performance Testing
|
|
124
|
+
|
|
125
|
+
- **Test Execution Speed:** Keep unit tests fast (language-specific timing guidelines in coding instructions)
|
|
126
|
+
- **Parallel Execution:** Structure tests to run safely in parallel
|
|
127
|
+
- **Resource Cleanup:** Ensure proper cleanup of test resources and temporary data
|
|
128
|
+
- **Memory Management:** Monitor and prevent memory leaks in long-running test suites
|
|
129
|
+
- **CI/CD Optimization:** Consider test execution time in continuous integration
|
|
130
|
+
|
|
131
|
+
## Test Maintenance
|
|
132
|
+
|
|
133
|
+
- **Regular Review:** Periodically review and refactor outdated tests
|
|
134
|
+
- **Documentation:** Document complex test scenarios and their purposes
|
|
135
|
+
- **Continuous Updates:** Update tests when requirements or APIs change
|
|
136
|
+
- **Test Quality:** Apply the same code quality standards to test code as production code
|
|
137
|
+
- **Update test-documentation.md:** Add new test cases to the appropriate table section
|
|
138
|
+
- **Status Tracking:** Update test status as development progresses
|
|
139
|
+
- **Table Format:** Maintain consistent table formatting and column alignment
|
|
140
|
+
- **ID Assignment:** Assign sequential IDs within each area (AREA-TYPE-001, AREA-TYPE-002, etc.)
|
|
141
|
+
|
|
142
|
+
## Cross-Platform Testing Considerations
|
|
143
|
+
|
|
144
|
+
- **Environment Consistency:** Ensure tests pass across development environments
|
|
145
|
+
- **Path Handling:** Use appropriate path handling for different operating systems
|
|
146
|
+
- **Dependency Versions:** Account for version differences across environments
|
|
147
|
+
- **Resource Availability:** Handle different resource constraints across platforms
|
|
148
|
+
|
|
149
|
+
## Test Automation and CI/CD
|
|
150
|
+
|
|
151
|
+
- **Automated Test Execution:** All tests must run automatically in CI/CD pipeline
|
|
152
|
+
- **Test Result Reporting:** Generate and store test reports for analysis
|
|
153
|
+
- **Failure Notification:** Immediate notification for test failures
|
|
154
|
+
- **Coverage Reporting:** Track and report test coverage over time
|
|
155
|
+
- **Quality Gates:** Use test results as quality gates for deployments
|
|
156
|
+
|
|
157
|
+
## Security Testing
|
|
158
|
+
|
|
159
|
+
- **Input Validation Testing:** Test with malicious and edge-case inputs
|
|
160
|
+
- **Authentication Testing:** Verify authentication mechanisms work correctly
|
|
161
|
+
- **Authorization Testing:** Ensure proper access controls
|
|
162
|
+
- **Data Protection Testing:** Verify sensitive data handling
|
|
163
|
+
- **Vulnerability Testing:** Include security-focused test cases
|
|
164
|
+
|
|
165
|
+
## Error Handling and Edge Case Testing
|
|
166
|
+
|
|
167
|
+
- **Boundary Conditions:** Test at the edges of valid input ranges
|
|
168
|
+
- **Error Scenarios:** Test error handling and recovery mechanisms
|
|
169
|
+
- **Network Failures:** Test behavior during network connectivity issues
|
|
170
|
+
- **Resource Exhaustion:** Test behavior under resource constraints
|
|
171
|
+
- **Invalid Input:** Test with malformed or unexpected input data
|
|
172
|
+
|
|
173
|
+
## Test Documentation and Reporting
|
|
174
|
+
|
|
175
|
+
- **Test Case Purpose:** Document why each test exists and what it validates
|
|
176
|
+
- **Test Setup Requirements:** Document any special setup or configuration needed
|
|
177
|
+
- **Known Issues:** Document known test limitations or flaky behaviors
|
|
178
|
+
- **Test Metrics:** Track test execution time, coverage, and success rates
|
|
179
|
+
- **Regular Reporting:** Generate regular test health reports
|
|
180
|
+
|
|
181
|
+
## Best Practices for Test Development
|
|
182
|
+
|
|
183
|
+
- **Test Independence:** Each test should be able to run independently
|
|
184
|
+
- **Descriptive Names:** Use clear, descriptive names for tests and test groups
|
|
185
|
+
- **Single Assertion Focus:** Each test should focus on one specific behavior
|
|
186
|
+
- **Arrange-Act-Assert Pattern:** Structure tests with clear setup, execution, and validation phases
|
|
187
|
+
- **Test Data Isolation:** Avoid test data conflicts between different test runs
|
|
188
|
+
- **Maintainable Tests:** Write tests that are easy to understand and modify
|