Contributing to SpecTacular โ
Thank you for considering contributing to SpecTacular! This guide will help you get started.
Ways to Contribute โ
- ๐ Report bugs
- ๐ก Suggest features
- ๐ Improve documentation
- ๐ง Fix issues
- โจ Add new features
- ๐งช Write tests
Getting Started โ
- Fork the repository
- Clone your fork:bash
git clone https://github.com/YOUR_USERNAME/SpecTacular.git - Set up development environment: See Development Setup
- Create a branch:bash
git checkout -b feature/your-feature-name
Development Process โ
1. Find or Create an Issue โ
- Check existing issues
- Create a new issue if needed
- Comment on the issue to claim it
2. Make Changes โ
- Follow code style guidelines
- Write tests for new features
- Update documentation
- Keep commits focused and atomic
3. Test Your Changes โ
CLI:
bash
cd spectacular-cli
dotnet test
dotnet buildExtension:
bash
cd spectacular-vscode
npm test
npm run compile4. Commit โ
Follow Conventional Commits:
bash
git commit -m "feat: add user authentication
- Implement JWT token generation
- Add login endpoint
- Update documentation"Types:
feat:New featurefix:Bug fixdocs:Documentation onlystyle:Code style (formatting, etc.)refactor:Code refactoringtest:Adding testschore:Maintenance tasks
5. Push and Create PR โ
bash
git push origin feature/your-feature-nameThen create a Pull Request on GitHub.
Code Style โ
C# (CLI) โ
- PascalCase for public members
- camelCase for private fields
- Use
async/awaitfor I/O operations - Add XML comments for public APIs
csharp
/// <summary>
/// Scaffolds a new project structure
/// </summary>
/// <param name="targetPath">Target directory path</param>
public async Task ScaffoldAsync(string targetPath)
{
// Implementation
}TypeScript (Extension/Webview) โ
- PascalCase for types, interfaces, classes
- camelCase for variables, functions
- Use type annotations
- Prefer
constoverlet
typescript
interface FileNode {
name: string;
path: string;
type: 'file' | 'folder';
}
const buildFileTree = (rootPath: string): FileNode[] => {
// Implementation
};React โ
- Functional components with hooks
- Props interfaces clearly defined
- Use TypeScript
typescript
interface EditorProps {
content: string;
onChange: (content: string) => void;
}
export const Editor: React.FC<EditorProps> = ({ content, onChange }) => {
// Implementation
};Testing Guidelines โ
CLI Tests โ
csharp
[Fact]
public async Task ScaffoldService_CreatesExpectedFiles()
{
// Arrange
var service = new ScaffoldService();
// Act
var result = await service.ScaffoldAsync(testPath, "TestProject");
// Assert
Assert.True(File.Exists(Path.Combine(testPath, "CLAUDE.md")));
}Extension Tests โ
typescript
test('Dashboard panel creates webview', () => {
const panel = DashboardPanel.createOrShow(extensionUri);
expect(panel).toBeDefined();
});Documentation โ
Update Documentation โ
When adding features:
- Update relevant
/docspages - Add code examples
- Update changelog
- Add JSDoc/XML comments
Documentation Style โ
- Use clear, concise language
- Include code examples
- Add diagrams for complex flows (Mermaid)
- Keep formatting consistent
Pull Request Guidelines โ
PR Checklist โ
- [ ] Code follows style guidelines
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] Commits follow conventional format
- [ ] All tests pass
- [ ] No merge conflicts
PR Template โ
markdown
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
## Testing
How to test the changes
## Screenshots (if applicable)
Add screenshots for UI changes
## Related Issues
Closes #123Review Process โ
- Automated checks run on PR
- Maintainer review (usually within 3 days)
- Address feedback if requested
- Approval from maintainer
- Merge to main branch
Community Guidelines โ
Be Respectful โ
- Be kind and courteous
- Provide constructive feedback
- Help newcomers
- Assume good intentions
Communication โ
- Ask questions if unclear
- Discuss major changes in issues first
- Be patient with review process
- Thank contributors
License โ
By contributing, you agree that your contributions will be licensed under the MIT License.
Questions? โ
- ๐ฌ GitHub Discussions
- ๐ GitHub Issues
- ๐ง Contact maintainers
Recognition โ
Contributors are recognized in:
- README.md Contributors section
- Release notes
- GitHub insights
Thank you for contributing! ๐