docs(project): complete project setup and documentation
- Add agent system constitution with time recording standards - Add Git workflow documentation for all agents - Add comprehensive time recording policy (UTC + GMT+8) - Add CHANGELOG with version history - Add CONTRIBUTING guide with Git workflow and commit conventions - Add project specification document - Add README with project overview - Add .gitignore for macOS and editor files - Update CLAUDE.md with project requirements and metadata Project initialized: 2025-10-04 08:50:35 UTC / 16:50:35 GMT+8
This commit is contained in:
211
CONTRIBUTING.md
Normal file
211
CONTRIBUTING.md
Normal file
@@ -0,0 +1,211 @@
|
||||
# Contributing Guide
|
||||
|
||||
**Document Created**: 2025-10-04 08:50:35 UTC / 2025-10-04 16:50:35 GMT+8
|
||||
**Last Updated**: 2025-10-04 08:50:35 UTC / 2025-10-04 16:50:35 GMT+8
|
||||
|
||||
## Git Workflow
|
||||
|
||||
### Repository
|
||||
- **Remote**: `ssh://gitea@git.shihong.me:2222/snowprint/halloween-test.git`
|
||||
- **Branch Strategy**: Feature branches with main branch protection
|
||||
|
||||
### Commit Guidelines
|
||||
|
||||
#### Commit Message Format
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
<body>
|
||||
|
||||
<footer>
|
||||
```
|
||||
|
||||
**Types:**
|
||||
- `feat`: New feature
|
||||
- `fix`: Bug fix
|
||||
- `docs`: Documentation changes
|
||||
- `style`: Code style changes (formatting, no logic change)
|
||||
- `refactor`: Code refactoring
|
||||
- `test`: Adding or updating tests
|
||||
- `chore`: Maintenance tasks
|
||||
|
||||
**Examples:**
|
||||
```
|
||||
feat(page): add ASCII McDonald's logo
|
||||
fix(mobile): improve ASCII art legibility on small screens
|
||||
docs(readme): update deployment instructions
|
||||
style(html): format inline CSS for readability
|
||||
```
|
||||
|
||||
#### Commit Best Practices
|
||||
- Write clear, concise commit messages
|
||||
- One logical change per commit
|
||||
- Commit early and often
|
||||
- Never commit sensitive data or credentials
|
||||
- Test before committing
|
||||
|
||||
### Branching Strategy
|
||||
|
||||
**Main Branch**: `main`
|
||||
- Production-ready code only
|
||||
- Protected branch (requires review)
|
||||
- Direct commits not allowed
|
||||
|
||||
**Feature Branches**: `feature/<description>`
|
||||
```bash
|
||||
git checkout -b feature/ascii-logo
|
||||
git checkout -b feature/event-details
|
||||
git checkout -b feature/mobile-responsive
|
||||
```
|
||||
|
||||
**Bugfix Branches**: `fix/<description>`
|
||||
```bash
|
||||
git checkout -b fix/mobile-layout
|
||||
git checkout -b fix/contrast-ratio
|
||||
```
|
||||
|
||||
**Hotfix Branches**: `hotfix/<description>`
|
||||
- For urgent production fixes
|
||||
```bash
|
||||
git checkout -b hotfix/critical-bug
|
||||
```
|
||||
|
||||
### Development Workflow
|
||||
|
||||
1. **Start New Work**
|
||||
```bash
|
||||
git checkout main
|
||||
git pull origin main
|
||||
git checkout -b feature/your-feature
|
||||
```
|
||||
|
||||
2. **Make Changes**
|
||||
```bash
|
||||
# Edit files
|
||||
git add .
|
||||
git commit -m "feat(scope): description"
|
||||
```
|
||||
|
||||
3. **Keep Updated**
|
||||
```bash
|
||||
git fetch origin
|
||||
git rebase origin/main
|
||||
```
|
||||
|
||||
4. **Push Changes**
|
||||
```bash
|
||||
git push origin feature/your-feature
|
||||
```
|
||||
|
||||
5. **Create Pull Request**
|
||||
- Open PR on Gitea
|
||||
- Request review from team
|
||||
- Address feedback
|
||||
- Merge after approval
|
||||
|
||||
### Code Review Process
|
||||
|
||||
**For Reviewers:**
|
||||
- Check code quality and standards
|
||||
- Verify functionality
|
||||
- Test on multiple devices
|
||||
- Approve or request changes
|
||||
|
||||
**For Authors:**
|
||||
- Respond to all comments
|
||||
- Make requested changes
|
||||
- Re-request review after updates
|
||||
- Squash commits before merge (if needed)
|
||||
|
||||
### Pre-commit Checklist
|
||||
|
||||
- [ ] Code follows project style guide
|
||||
- [ ] HTML5 validation passes
|
||||
- [ ] Tested on desktop and mobile
|
||||
- [ ] ASCII art displays correctly
|
||||
- [ ] No console errors
|
||||
- [ ] Commit message follows convention
|
||||
- [ ] No sensitive data included
|
||||
|
||||
### DevOps Engineer Responsibilities
|
||||
|
||||
As DevOps engineer, you must:
|
||||
|
||||
1. **Repository Management**
|
||||
- Maintain clean commit history
|
||||
- Enforce branch protection rules
|
||||
- Monitor repository health
|
||||
|
||||
2. **CI/CD Pipeline** (if implemented)
|
||||
- Automated testing on push
|
||||
- HTML validation checks
|
||||
- Deployment automation
|
||||
|
||||
3. **Version Control Best Practices**
|
||||
- Regular backups
|
||||
- Tag releases appropriately
|
||||
- Document deployment procedures
|
||||
|
||||
4. **Security**
|
||||
- No credentials in repository
|
||||
- Secure SSH key management
|
||||
- Access control enforcement
|
||||
|
||||
### Useful Git Commands
|
||||
|
||||
```bash
|
||||
# Check status
|
||||
git status
|
||||
|
||||
# View commit history
|
||||
git log --oneline --graph
|
||||
|
||||
# Undo last commit (keep changes)
|
||||
git reset --soft HEAD~1
|
||||
|
||||
# Discard local changes
|
||||
git checkout -- <file>
|
||||
|
||||
# Update from remote
|
||||
git pull --rebase origin main
|
||||
|
||||
# View remote URL
|
||||
git remote -v
|
||||
|
||||
# Create and push tag
|
||||
git tag -a v1.0.0 -m "Release version 1.0.0"
|
||||
git push origin v1.0.0
|
||||
```
|
||||
|
||||
### Versioning
|
||||
|
||||
Follow Semantic Versioning (SemVer): `MAJOR.MINOR.PATCH`
|
||||
|
||||
- **MAJOR**: Breaking changes
|
||||
- **MINOR**: New features (backward compatible)
|
||||
- **PATCH**: Bug fixes
|
||||
|
||||
**Example:**
|
||||
- `v1.0.0` - Initial release
|
||||
- `v1.1.0` - Add new activity section
|
||||
- `v1.1.1` - Fix mobile layout bug
|
||||
|
||||
### Getting Help
|
||||
|
||||
- Check project documentation in `CLAUDE.md`
|
||||
- Review `project-spec.md` for requirements
|
||||
- Contact DevOps engineer for repository issues
|
||||
- Ask team lead for workflow clarification
|
||||
|
||||
## Time Recording Policy
|
||||
|
||||
**All documentation must follow time recording standards:**
|
||||
|
||||
- Record timestamps in both UTC and GMT+8
|
||||
- Never fabricate or guess dates
|
||||
- Use "TBD" for unconfirmed dates
|
||||
- See `.claude/time-recording-policy.md` for details
|
||||
|
||||
## Questions?
|
||||
|
||||
Contact the McDonald's IT team or project maintainer.
|
||||
Reference in New Issue
Block a user