Guidelines for collaboration and development workflow
| Branch Type | Purpose | Content | Restrictions |
|---|---|---|---|
| Documentation Hub | Markdown files, activity logs | No contract code | |
| Development Work | Contracts, tests, scripts | Self-contained topics |
The master branch serves as the central documentation and activity tracking hub:
Allowed Content:
ACTIVITY.md- Chronological activity logREADME.md- Project overview and setupCONTRIBUTING.md- Collaboration guidelinespublic/md/- Documentation files.github/- GitHub workflows and templates
Restrictions:
- ❌ No contract code (
.solfiles) - ❌ No test files (
.js,.tstest files) - ❌ No deployment scripts
- ✅ Markdown documentation only
Each week gets its own dedicated branch for focused development:
Branch Naming: weekly-N (e.g., weekly-1, weekly-2)
Content Structure:
weekly-N/
├── README.md # Week overview and goals
├── contracts/ # Smart contract modules
│ ├── WeekNContract.sol
│ └── interfaces/
├── test/ # Test files
│ ├── WeekNContract.test.js
│ └── helpers/
├── scripts/ # Deployment and interaction scripts
│ ├── deploy.js
│ └── interact.js
└── docs/ # Week-specific documentation
├── design-decisions.md
└── lessons-learned.md
| Step | Command | Description |
|---|---|---|
| 1 | git checkout master |
Switch to master branch |
| 2 | git pull origin master |
Update with latest changes |
| 3 | git checkout -b weekly-N |
Create new weekly branch |
| 4 | git push -u origin weekly-N |
Push and set upstream |
| Phase | Description | Duration | Tools |
|---|---|---|---|
| Planning | Review goals and plan daily tasks | 15 min | GitHub Issues |
| Development | Implement contract features | 2-4 hours | Hardhat, VS Code |
| Testing | Write and run tests | 1-2 hours | Chai, Mocha, Foundry |
| Documentation | Update README and comments | 30 min | Markdown |
| Commit | Commit with descriptive message | 5 min | Git |
| Step | Description | Duration |
|---|---|---|
| Final Review | Code review and testing | 1 hour |
| Documentation | Complete week's README | 30 min |
| Activity Update | Update master ACTIVITY.md | 15 min |
| Branch Merge | Merge to master (docs only) | 10 min |
| Standard | Requirement | Tool |
|---|---|---|
| Solidity Version | ^0.8.0 | Pragma directive |
| NatSpec Comments | All functions documented | Manual review |
| OpenZeppelin | Use standard libraries | Import statements |
| Security | Pass Slither analysis | Slither tool |
| Gas Optimization | Optimize for efficiency | Gas profiling |
| Test Type | Coverage Target | Framework |
|---|---|---|
| Unit Tests | 90%+ | Chai, Mocha |
| Integration Tests | 85%+ | Waffle |
| Fuzz Tests | 80%+ | Foundry |
| Security Tests | 100% | Slither, MythX |
| Document | Purpose | Format |
|---|---|---|
| README.md | Week overview and goals | Markdown |
| Design Decisions | Technical choices made | Markdown |
| Lessons Learned | Key insights and pitfalls | Markdown |
| Code Comments | Inline documentation | NatSpec |
type(scope): brief description
Detailed explanation of changes
- Bullet points for specific changes
- Reference issues if applicable
Closes #issue_number
feat: New feature or contractfix: Bug fix or security patchdocs: Documentation updatestest: Test additions or improvementsrefactor: Code refactoringstyle: Code formatting changeschore: Maintenance tasks
feat(erc20): implement basic ERC20 token with mint/burn
- Add ERC20 contract with OpenZeppelin imports
- Implement mint and burn functions
- Add comprehensive NatSpec documentation
- Include access control for minting
Closes #1
| Step | Description | Checklist |
|---|---|---|
| 1 | Create PR from weekly branch | [ ] Descriptive title |
| 2 | Fill out PR template | [ ] Link to issues |
| 3 | Request review | [ ] Assign reviewers |
| 4 | Address feedback | [ ] Update documentation |
| 5 | Merge to master | [ ] Update ACTIVITY.md |
## Week N: [Contract Name/Pattern]
### Overview
Brief description of the week's focus and goals.
### Changes Made
- [ ] Contract implementation
- [ ] Test coverage
- [ ] Documentation updates
- [ ] Security analysis
### Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Security analysis clean
- [ ] Gas optimization complete
### Documentation
- [ ] README updated
- [ ] Code comments added
- [ ] Design decisions documented
- [ ] Lessons learned recorded
### Links
- Closes #[issue_number]
- Related to #[issue_number]| Category | Checklist Items |
|---|---|
| Functionality | [ ] Contract works as intended [ ] All functions tested [ ] Edge cases handled |
| Security | [ ] No reentrancy vulnerabilities [ ] Access controls implemented [ ] Input validation present |
| Gas Efficiency | [ ] Optimized for gas usage [ ] No unnecessary operations [ ] Efficient data structures |
| Documentation | [ ] NatSpec comments present [ ] README updated [ ] Code is readable |
- Automated Checks: Ensure all CI/CD checks pass
- Security Analysis: Run Slither and other security tools
- Test Coverage: Verify test coverage meets standards
- Code Quality: Review for readability and best practices
- Documentation: Ensure all changes are documented
| Platform | Purpose | Guidelines |
|---|---|---|
| GitHub Issues | Bug reports and feature requests | Use templates, be specific |
| Discussions | General questions and ideas | Be respectful, constructive |
| Pull Requests | Code contributions | Follow guidelines, be responsive |
| Discord | Real-time collaboration | Keep on-topic, be helpful |
- Be Respectful: Treat all contributors with respect
- Be Constructive: Provide helpful feedback and suggestions
- Be Patient: Allow time for responses and reviews
- Be Professional: Maintain professional communication
- Be Inclusive: Welcome contributors from all backgrounds
| Resource | Purpose | Link |
|---|---|---|
| Documentation | Project guidelines and standards | README.md |
| Activity Log | Project progress and history | ACTIVITY.md |
| Workflow Guide | Daily and weekly processes | Activity Workflow |
| Discord | Community support and discussion | Join Discord |
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and ideas
- Discord: Real-time help and collaboration
- Email: Direct contact for sensitive issues
Last Updated: 2024-01-15 | Version: 1.0.0
Building a collaborative smart contract development community