Quick Checklist
Before submitting your pull request, verify you have completed all items:Semantic Versioning
All modules must follow Semantic Versioning 2.0.0 standards.Version Format
MAJOR Version
MAJOR Version
Increment when you make incompatible API changes:
- Removing or renaming public APIs
- Changing method signatures
- Breaking backward compatibility
- Major architectural changes
1.5.3 → 2.0.0MINOR Version
MINOR Version
Increment when you add backwards-compatible functionality:
- Adding new features
- Adding new templates or patterns
- Extending existing functionality
- Adding new optional parameters
1.5.3 → 1.6.0PATCH Version
PATCH Version
Increment when you make backwards-compatible bug fixes:
- Fixing bugs
- Correcting generated code issues
- Performance improvements
- Documentation updates
1.5.3 → 1.5.4Updating Module Version
Update the version in your module’s.imodspec file:
Module Structure
Module Specification (.imodspec)
Every module requires a properly configured.imodspec file:
Ensure all dependencies are listed with appropriate version ranges to avoid compatibility issues.
Testing Requirements
All contributions must include appropriate test cases in the Tests Intent Architect solution.Test Solution Location
Types of Tests
Unit Tests
Test individual components and templates in isolation
Integration Tests
Test interaction with other modules and generated code
Generation Tests
Verify generated code matches expected output
Build Tests
Ensure generated code compiles successfully
Test Best Practices
Comprehensive Coverage
Comprehensive Coverage
Test all new functionality, including:
- Happy path scenarios
- Edge cases
- Error conditions
- Integration points
Realistic Scenarios
Realistic Scenarios
Create test cases that reflect real-world usage patterns developers will encounter.
Maintainable Tests
Maintainable Tests
Write clear, well-documented tests that others can understand and maintain.
Generated Code Quality
Generated Code Quality
Verify that generated code:
- Compiles without warnings
- Follows C# best practices
- Is readable and maintainable
- Includes appropriate comments and documentation
Pre-commit Validation
Running Pre-commit Checks
Therun-pre-commit-checks.ps1 script validates your changes before submission:
What the Script Validates
- Phase 1
- Phase 2
- Phase 3
- Phase 4
- Phase 5
Pre-build ValidationsValidates:
- Module metadata files (
.imodspec) - Configuration correctness
- File structure integrity
Troubleshooting Failed Checks
Pre-build Validation Failures
Pre-build Validation Failures
Common Issues:
- Invalid XML in
.imodspecfiles - Missing required metadata fields
- Incorrect file paths in module specification
.imodspec file against the schema.Outstanding Changes Failures
Outstanding Changes Failures
Common Issues:
- Uncommitted Software Factory changes
- Module configuration mismatches
- Cached module conflicts
Build Failures
Build Failures
Common Issues:
- Compilation errors in templates
- Missing dependencies
- Breaking changes in referenced modules
Test Build Failures
Test Build Failures
Common Issues:
- Test project configuration errors
- Missing test dependencies
- Generated code doesn’t compile
Code Quality Standards
Generated Code Quality
Your templates must generate code that:Readable
Looks like hand-written code with proper formatting and naming
Maintainable
Easy to understand and modify for developers
Idiomatic
Follows C# and .NET conventions and best practices
Documented
Includes XML documentation comments where appropriate
Template Code Quality
- Organization
- Documentation
- Error Handling
- Performance
- Use clear, descriptive names for templates and classes
- Organize templates logically by functionality
- Keep templates focused on single responsibilities
Module Dependencies
Declaring Dependencies
Properly declare all module dependencies in your.imodspec:
Dependency Guidelines
Version Ranges
Version Ranges
Use appropriate version ranges to balance compatibility and features:
- Exact version:
version="1.2.3"- Use for critical dependencies - Minimum version:
version="1.2.3"- Most common approach - Consider the stability and update frequency of dependencies
Common Modules
Common Modules
Most modules will depend on:
Intent.Common- Core functionalityIntent.Common.Types- Common type definitions- Specific modeler modules for metadata
Minimizing Dependencies
Minimizing Dependencies
Only include necessary dependencies:
- Each dependency increases installation complexity
- Consider whether functionality can be self-contained
- Document why each dependency is required
Documentation
Module Documentation
Include adocs/README.md file in your module folder:
Release Notes
Updaterelease-notes.md with your changes:
Best Practices Summary
Before You Start
- Review existing modules for patterns
- Understand the problem you’re solving
- Check for similar existing functionality
- Plan your changes thoroughly
During Development
- Follow existing code patterns
- Write tests as you develop
- Keep changes focused and atomic
- Test generated code thoroughly
Before Submitting
- Update version number
- Run pre-commit checks
- Add test cases
- Update documentation
After Submitting
- Respond to review comments
- Test pre-release versions
- Help with integration testing
- Update if issues are found
Additional Resources
Get Support
Have questions? Visit our GitHub support repository for help.
These guidelines are designed to help maintain the high quality and consistency of Intent Architect modules. If you have suggestions for improving these guidelines, please let us know!
