Workflows
Development workflows for efficient team collaboration, CI/CD integration, and environment management.
Environment Setup
Color-Coded Terminals
Prevent production accidents by visually distinguishing environments:
Terminal Colors:
- Development: Green prompt/background
- Staging/Test: Yellow prompt/background
- Production: Red prompt/background
Implementation (bash/zsh):
# Add to .bashrc or .zshrc
if [[ "$ENV" == "production" ]]; then
PS1='\[\033[0;31m\][PROD]\[\033[0m\] \w $ '
elif [[ "$ENV" == "staging" ]]; then
PS1='\[\033[0;33m\][STAGE]\[\033[0m\] \w $ '
else
PS1='\[\033[0;32m\][DEV]\[\033[0m\] \w $ '
fiIDE Configuration
Maintain consistent settings across team:
// .vscode/settings.json
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.preferences.importModuleSpecifier": "relative",
"files.exclude": {
"**/node_modules": true,
"**/.next": true
}
}Git Workflows
Branch Naming
feature/TICKET-123-short-description
bugfix/TICKET-456-fix-auth-error
hotfix/TICKET-789-critical-security-fix
chore/update-dependencies
docs/add-api-documentationCommit Messages
Follow conventional commits:
type(scope): description
feat(auth): add OAuth2 support
fix(api): handle null response from gateway
docs(readme): update installation steps
refactor(components): extract shared button logic
test(auth): add unit tests for login flow
chore(deps): update next.js to 16.0.10Pull Request Process
-
Create PR with template
- Description of changes
- Link to ticket/issue
- Screenshots for UI changes
- Testing instructions
-
Automated checks
- Linting passes
- Tests pass
- Build succeeds
- Security scan clean
-
Human review
- Code review by peer
- Approval from code owner
- QA verification if needed
-
Merge and deploy
- Squash merge to main
- Automatic deployment to staging
- Manual promotion to production
CI/CD Integration
AI-Assisted Debugging
When CI fails, feed the logs to AI:
Here are the CI failure logs:
[paste logs]
Please analyze:
1. Root cause of failure
2. Suggested fix
3. Steps to verify fix locallyAutomated Quality Gates
# Example GitHub Actions workflow
name: Quality Gates
on: [push, pull_request]
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: pnpm install
- name: Type check
run: pnpm typecheck
- name: Lint
run: pnpm lint
- name: Test
run: pnpm test
- name: Build
run: pnpm buildDocumentation Workflow
Docs as Code
Keep documentation in the same repository as code:
project/
├── src/
├── docs/ # User documentation
├── README.md # Project overview
├── CONTRIBUTING.md # Contribution guide
├── CLAUDE.md # AI assistant rules
└── CHANGELOG.md # Version historyDocumentation Updates
- With code changes - Update docs in same PR
- Review process - Technical writer or peer review
- Automated checks - Broken link detection, spell check
- Versioning - Docs versioned with releases
Team Collaboration
Knowledge Sharing
- Weekly tech talks on new patterns
- Document decisions in ADRs (Architecture Decision Records)
- Pair programming for complex features
- Code review as learning opportunity
Onboarding New Developers
- Point to documentation first
- Enable AI “learning mode” for detailed explanations
- Assign buddy for questions
- Start with small, well-defined tasks
- Review first PRs thoroughly with feedback
Incident Response
- Detect - Monitoring alerts or user reports
- Respond - Acknowledge, assess severity
- Mitigate - Quick fix or rollback
- Resolve - Permanent fix
- Review - Post-mortem, update runbooks
Last updated on