mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-02-12 06:55:08 -05:00
CHANGES - Add CODE_OF_CONDUCT defining respectful, collaborative community behavior - Add CONTRIBUTING with setup, testing, PR, changelog requirements - Add SECURITY policy with reporting process and response timelines - Add SUPPORT guide for bugs, features, discussions, expectations - Add docs README indexing guides, quick starts, contributor essentials
2.8 KiB
2.8 KiB
Contributing to Fabric
Thanks for contributing to Fabric! Here's what you need to know to get started quickly.
Quick Setup
Prerequisites
- Go 1.24+ installed
- Git configured with your details
Getting Started
# Clone and setup
git clone https://github.com/danielmiessler/fabric.git
cd fabric
go build -o fabric ./cmd/fabric
./fabric --setup
# Run tests
go test ./...
Development Guidelines
Code Style
- Follow standard Go conventions (
gofmt,golint) - Use meaningful variable and function names
- Write tests for new functionality
- Keep functions focused and small
Commit Messages
Use descriptive commit messages:
feat: add new pattern for code analysis
fix: resolve OAuth token refresh issue
docs: update installation instructions
Project Structure
cmd/- Executable commandsinternal/- Private application codedata/patterns/- AI patternsdocs/- Documentation
Pull Request Process
Changelog Generation (REQUIRED)
Before submitting your PR, generate a changelog entry:
cd cmd/generate_changelog
go build -o generate_changelog .
./generate_changelog --incoming-pr YOUR_PR_NUMBER
Requirements:
- PR must be open and mergeable
- Working directory must be clean
- GitHub token available (GITHUB_TOKEN env var)
Optional flags:
--ai-summarize- Enhanced AI-generated summaries--push- Auto-push the changelog commit
PR Guidelines
- Fork the repository
- Create a feature branch
- Make your changes
- Write/update tests
- Generate changelog entry (see above)
- Submit PR with clear description
Review Process
- PRs require maintainer review
- Address feedback promptly
- Keep PRs focused on single features/fixes
- Update changelog if you make significant changes
Testing
Run Tests
# All tests
go test ./...
# Specific package
go test ./internal/cli
# With coverage
go test -cover ./...
Test Requirements
- Unit tests for core functionality
- Integration tests for external dependencies
- Examples in documentation
Patterns
Creating Patterns
Patterns go in data/patterns/[pattern-name]/system.md:
# IDENTITY and PURPOSE
You are an expert at...
# STEPS
- Step 1
- Step 2
# OUTPUT
- Output format requirements
# EXAMPLE
Example output here
Pattern Guidelines
- Use clear, actionable language
- Provide specific output formats
- Include examples when helpful
- Test with multiple AI providers
Documentation
- Update README.md for new features
- Add docs to
docs/for complex features - Include usage examples
- Keep documentation current
Getting Help
- Check existing issues first
- Ask questions in discussions
- Tag maintainers for urgent issues
- Be patient - maintainers are volunteers
License
By contributing, you agree your contributions will be licensed under the MIT License.