Lección 11 de 11

Workflows Profesionales y Productividad

Workflows que Maximizan Productividad

Integra todas las herramientas en flujos eficientes. Best practices de developers top.

Workflow Diario

// Morning Routine:
1. Review PRs (Claude)
   - Cmd+L en Claude: "Review este PR"
   - Análisis profundo
   - Feedback constructivo
2. Planning (ChatGPT)
   - "Priorizar tasks del sprint"
   - Identificar dependencias
   - Time estimates
3. Coding (Copilot + Cursor)
   - Copilot: Autocomplete
   - Cursor Composer: Features grandes
   - Cmd+K: Ajustes inline
4. Testing (IA generada)
   - /tests para coverage
   - Debug con Copilot Chat
5. Documentation (IA)
   - /doc para JSDoc
   - README updates
   - API docs
6. End of day:
   - Commit con mensaje IA-mejorado
   - Update Jira/Linear
   - Tomorrow plan (ChatGPT)

Feature Development Flow

// Implementar Feature Completa:
━━━ FASE 1: PLANNING ━━━
1. Claude Project:
   "Diseña arquitectura para [feature]:
   - DB schema
   - API design
   - Frontend components
   - State management
   - Testing strategy"
2. Create GitHub issue from plan
3. Branch: feature/[name]
━━━ FASE 2: BACKEND ━━━
4. Cursor Composer:
   "Implementa backend:
   [specs from planning]
   Files:
   - Prisma migration
   - tRPC router
   - Zod validations
   - Service layer
   - Tests"
5. Review generated code
6. Copilot: Ajustes inline
7. Run tests: npm test
━━━ FASE 3: FRONTEND ━━━
8. Cursor Composer:
   "Implementa UI:
   [specs]
   Components:
   - [list]
   Hooks:
   - [list]
   Pages:
   - [list]"
9. Copilot: Styling, animations
10. Manual: UX polish
━━━ FASE 4: INTEGRATION ━━━
11. E2E tests (ChatGPT):
    "Generate Playwright tests
    for complete user journey"
12. Test locally
13. Fix bugs (Copilot Chat /fix)
━━━ FASE 5: REVIEW ━━━
14. Self review (Claude):
    "Review todo el feature:
    @src/features/[name]
    Check:
    - Security
    - Performance
    - Accessibility
    - Edge cases
    - Tests coverage"
15. Apply suggestions
━━━ FASE 6: PR ━━━
16. ChatGPT:
    "Generate PR description:
    Changes:
    [git diff summary]
    Format:
    - What changed
    - Why
    - Testing done
    - Screenshots
    - Breaking changes
    - Migration guide if needed"
17. Create PR
18. Address review comments (IA assist)
19. Merge
━━━ FASE 7: DEPLOY ━━━
20. Deploy to staging
21. Smoke tests
22. Deploy to prod
23. Monitor (check Sentry/Datadog)
24. Update docs

Bug Fix Workflow

// Production Bug:
1. Triage (gather info):
   - Error logs
   - Stack trace
   - User reports
   - Reproduction steps
2. Claude Analysis:
   "Bug en producción:
   [toda la info]
   Analiza:
   - Causa probable
   - Severity
   - Affected users
   - Hotfix vs patch
   - Rollback risk"
3. Reproduce locally:
   - Cursor: "Help me reproduce [bug]"
4. Write test que falla:
   - Copilot: "/tests for this bug"
5. Fix (TDD):
   - Copilot Chat: "/fix"
   - Test pasa ✅
6. Regression tests:
   - IA: "Generate tests para prevenir
          regression de este bug"
7. Review (Claude):
   - "Review fix. Es seguro?
      Side effects?"
8. Deploy hotfix:
   - Fast-track PR
   - Deploy
   - Monitor
9. Post-mortem (ChatGPT):
   "Generate post-mortem:
   [incident details]
   Include:
   - Timeline
   - Root cause
   - Impact
   - Resolution
   - Prevention measures"

Refactoring Workflow

// Legacy Code Modernization:
1. Audit (Claude):
   "Audita este código legacy:
   @src/legacy/[module]
   Identifica:
   - Technical debt
   - Anti-patterns
   - Security issues
   - Performance problems
   - Modernization oportunidades"
2. Plan (ChatGPT):
   "Crea migration plan:
   [audit results]
   Phases:
   - Backwards compatible
   - Gradual rollout
   - Rollback strategy
   - Testing approach"
3. Tests first:
   "Generate comprehensive tests
   for existing behavior.
   Estos tests NO deben fallar
   después del refactor."
4. Refactor (Cursor Composer):
   "Refactor siguiendo plan:
   - Modern syntax
   - Best practices
   - Types
   - Same behavior
   ALL existing tests must pass."
5. New tests:
   "Add tests for new patterns
   and edge cases"
6. Performance check:
   - Benchmark before/after
   - IA: "Analyze performance impact"
7. Deploy gradual:
   - Feature flag
   - 10% → 50% → 100%
   - Monitor metrics

Learning Workflow

// Nueva Tecnología:
1. ChatGPT roadmap:
   "Create learning path para [tech]
   Background: [tu nivel]
   Goal: Production-ready en 2 semanas
   Time: 10h/week"
2. Sigue roadmap
3. Build project:
   - Claude: Architecture advice
   - Copilot: Code faster
   - ChatGPT: Explain concepts
4. IA tutor:
   "Explain [concepto difícil]
   Like I'm intermediate developer
   Con ejemplos prácticos"
5. Practice:
   - IA genera ejercicios
   - Code challenges
   - Real-world scenarios
6. Review:
   - IA review de tu código
   - Feedback
   - Mejoras

Code Review Workflow

// Reviewing PRs:
1. Initial scan:
   - Files changed
   - Size of PR
   - Description quality
2. IA pre-review (Claude):
   "Review este PR:
   [paste diff]
   Focus:
   - Logic errors
   - Security
   - Performance
   - Tests coverage"
3. Manual review:
   - Business logic
   - UX considerations
   - Architecture fit
4. Feedback (ChatGPT help):
   "Help me phrase this review comment
   constructivamente:
   Issue: [describe]
   Suggestion: [describe]
   Tone: Helpful, not critical"

Documentation Workflow

// Mantener Docs Actualizados:
1. Code → Docs auto:
   - Copilot: /doc para JSDoc
   - TypeScript types = docs
2. API docs:
   - OpenAPI from code
   - ChatGPT: "Generate API docs
               from these endpoints"
3. README:
   - ChatGPT: "Update README:
               [cambios recientes]
               Keep professional tone"
4. Guides:
   - Claude: "Write guide:
              How to [task]
              Target: New developers
              Include code examples"
5. Architecture docs:
   - Claude Projects mantiene
   - Generate diagrams (Mermaid)
   - Keep in sync

Productivity Tips

Keyboard Maestro

// Setup hotkeys:
Cmd+Shift+C → Copilot Chat
Cmd+Shift+K → Cursor Cmd+K
Cmd+Shift+L → Cursor Chat
Cmd+Shift+G → Open ChatGPT
Cmd+Shift+A → Open Claude
// Fast context switch

Snippets IA-Enhanced

// VS Code snippets que usan IA:
"rfc" → React component
  → Copilot completa con tu patterns
"test" → Test template
  → Copilot genera tests relevantes
"api" → API endpoint
  → Copilot sigue tu API patterns

Templates

// PR template con IA:
## Changes
[ChatGPT: summarize git diff]
## Why
[Link to issue]
## Testing
[IA: list test scenarios]
## Screenshots
[if UI changes]
## Checklist
- [ ] Tests added
- [ ] Docs updated
- [ ] No console.logs
- [ ] Types updated

Anti-Patterns

❌ NO HACER:
1. Aceptar código IA sin revisar
   ✅ Siempre lee y entiende
2. Copiar sin adaptar
   ✅ Ajusta a tu contexto
3. Skip tests
   ✅ Tests siempre
4. Confiar en security sin verify
   ✅ Audit código sensible
5. No aprender, solo copiar
   ✅ Entiende qué hace el código
6. Dependencia 100% IA
   ✅ IA = assistant, no replacement

Metrics

// Tracking productivity:
1. Velocity:
   - Story points / sprint
   - Antes vs después IA
2. Code quality:
   - Bug rate
   - Code review comments
   - Test coverage
3. Time saved:
   - Less Stack Overflow
   - Faster debugging
   - Quick tests generation
4. Learning speed:
   - New tech adoption time
   - Ramp-up para projects
Typical gains:
- 40-60% faster development
- 50% less debugging time
- 70% less doc writing time
- 80% faster test generation

Team Workflow

// Estandarizar en equipo:
1. .cursorrules compartido:
   - Team code style
   - Patterns preferidos
   - Libraries standard
2. Custom GPTs compartidos:
   - Company-specific
   - Upload codebase patterns
3. Prompts library:
   - Repository de prompts good
   - Templates por task type
4. IA pair programming:
   - Sesiones con IA
   - Share learnings
5. Code review con IA:
   - Standard: IA pre-review
   - Human review after
6. Knowledge base:
   - Claude Projects con docs
   - Team accessible

Workflow integrado = 10x developer. Practica hasta que sea natural.