Workflow Rules
This document defines the standard development workflow at EGI, from writing code to deploying it in production. Every project follows these rules unless a documented exception is approved by a project lead.
Branch Strategy
EGI uses a feature branch workflow with a protected main branch.
Branch Naming
| Branch Type | Format | Example |
|---|---|---|
| Feature | feature/[short-description] | feature/user-auth |
| Bug fix | fix/[short-description] | fix/login-redirect |
| Hotfix (production) | hotfix/[short-description] | hotfix/api-timeout |
| Chore / maintenance | chore/[short-description] | chore/update-deps |
| Release | release/[version] | release/1.2.0 |
Rules
mainis always deployable. No one pushes directly tomain.- Every change goes through a feature branch created from the latest
main. - Branch names are lowercase, hyphen-separated, and descriptive enough to understand the purpose without reading the code.
- Delete branches after they are merged.
Pull Request Process
Creating a Pull Request
- Push your feature branch to the remote repository
- Open a pull request (PR) against
main - Fill in the PR template completely:
- Summary: What changed and why
- Test plan: How the change was tested
- Screenshots/recordings: If the change affects UI
- Related issues: Link to relevant tickets or issues
- Assign at least one reviewer
- Ensure all CI checks pass before requesting review
Code Review Standards
Reviewer responsibilities:
- Review within 4 business hours of being assigned (or reassign if unavailable)
- Check for correctness, readability, test coverage, and adherence to project conventions
- Leave constructive, specific comments tied to the code, not the person
- Approve, request changes, or comment (never leave a review in an ambiguous state)
Author responsibilities:
- Respond to all review comments within 1 business day
- If you disagree with a comment, explain your reasoning rather than dismissing it
- Do not merge your own PR without approval (except for documented emergency hotfixes)
Approval Gates
| Change Type | Required Approvals | Additional Requirements |
|---|---|---|
| Standard feature or fix | 1 engineer | CI passing |
| Database migration | 1 engineer + project lead | Migration tested on staging |
| Infrastructure change | 1 engineer + project lead | Rollback plan documented |
| Security-sensitive change | 1 engineer + project lead | Security review completed |
| Hotfix (production emergency) | 1 engineer (post-merge review acceptable) | Incident documented within 24h |
Definition of Done
A feature or fix is considered done when all of the following are true:
- Code is written and follows project coding standards
- Unit tests are written and passing for new or changed logic
- Integration tests are updated if the change affects API contracts or data flows
- The feature works correctly on the staging environment
- The PR has been reviewed and approved
- Documentation is updated if the change affects user-facing behavior, API contracts, or operational procedures
- No unresolved review comments remain
- CI pipeline passes all checks (lint, test, build, type check)
Sprint Cadence
EGI operates on two-week sprints.
| Event | Day | Duration | Purpose |
|---|---|---|---|
| Sprint planning | Day 1 (Monday) | 60 min | Scope and assign work for the sprint |
| Daily standup | Every day | 15 min | Blockers, status, priorities |
| Mid-sprint check-in | Day 5 (Friday) | 15 min | Assess progress, adjust scope if needed |
| Sprint review / demo | Day 10 (Friday) | 30 min | Demonstrate completed work to stakeholders |
| Sprint retrospective | Day 10 (Friday) | 30 min | Identify process improvements |
Sprint Rules
- Do not add work to an active sprint without removing equivalent effort. Scope changes during a sprint require project lead approval.
- Carry-over items from the previous sprint are discussed and re-prioritized in planning, not automatically included.
- Unfinished work is flagged in the retrospective with a root cause (blocked, underestimated, scope creep, etc.).
Merge and Deploy Flow
The standard flow from code to production:
feature branch → PR → code review → approval → merge to main → staging deploy → staging verification → production deploy
Step-by-Step
- Merge to main: After PR approval, the author merges using squash merge to keep the commit history clean
- Staging deploy: Merging to
maintriggers an automatic deployment to the staging environment - Staging verification: The author verifies the change on staging, including smoke tests for affected functionality
- Production deploy: Production deployment is triggered manually after staging verification
- Post-deploy monitoring: The author monitors production for 30 minutes after deploy for errors, performance regressions, or unexpected behavior
Rollback
If a production deployment causes issues:
- Revert the merge commit on
mainvia a new PR (fast-track review) - Deploy the reverted
mainto production - Open a new issue documenting the failure
- Fix the issue on a new feature branch and go through the standard process
Release Approval Process
For versioned releases or major deployments:
- The project lead creates a
release/[version]branch frommain - Final testing and bug fixes are applied to the release branch
- The release branch PR requires approval from the project lead and one engineer
- After merge, the release is tagged with a semantic version (e.g.,
v1.2.0) - The changelog is updated and stakeholders are notified
See the Release Checklist for the full step-by-step release process.
Emergency Hotfixes
When a critical production issue requires an immediate fix:
- Create a
hotfix/[description]branch frommain - Apply the minimal fix necessary to resolve the issue
- Open a PR and request expedited review (tag with "urgent" label)
- One approval is sufficient; the fix can be merged by the author if no reviewer is available within 30 minutes
- Deploy to production immediately after merge
- Within 24 hours, complete a post-incident review and create follow-up tickets for any deferred work