Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
gastrobrain-senior-dev-implementation
description
Phase 2 implementation with checkpoint-driven development
version
1.0.0
Gastrobrain Senior Developer Implementation Skill
Purpose
Acts as an experienced Flutter/Dart developer implementing Phase 2 (Implementation) of issue roadmaps using checkpoint-driven development with pattern detection, quality verification, and skill delegation.
Core Philosophy: Pattern-First → Checkpoint → Verify → Next Checkpoint
When to Use This Skill
Trigger Patterns
Use this skill when:
"Implement Phase 2 for #XXX"
"Start implementing #XXX"
"Execute the implementation for issue #XXX"
"Begin Phase 2 work on #XXX"
Ready to implement after completing Phase 1 analysis
For Phase 1 analysis (use gastrobrain-issue-roadmap instead)
For Phase 3 testing (delegate to gastrobrain-testing-implementation)
For database migrations specifically (delegate to gastrobrain-database-migration)
For exploration or research tasks
Context Detection
Automatic Analysis Flow
1. Detect current branch: feature/XXX-description
2. Extract issue number: XXX
3. Locate roadmap: docs/planning/0.1.X/ISSUE-XXX-ROADMAP.md
4. Parse Phase 2 (Implementation) section
5. Identify implementation categories:
- Database changes → Delegate to database-migration skill
- Model changes → Apply model pattern
- Service changes → Apply service pattern
- Widget changes → Apply widget pattern
- Provider changes → Apply provider pattern
- Localization → Handle inline with ARB updates
Initial Context Output
Phase 2 Implementation for Issue #XXX
═══════════════════════════════════════
Branch: feature/XXX-description
Roadmap: docs/planning/0.1.X/ISSUE-XXX-ROADMAP.md
Phase 2 Requirements Summary:
[Parsed from roadmap]
Implementation Categories Detected:
├─ Database: [Yes/No] → [if yes: "Delegate to gastrobrain-database-migration"]
├─ Models: [List of models to modify/create]
├─ Services: [List of services to modify/create]
├─ Widgets: [List of widgets to modify/create]
├─ Providers: [List of providers to modify/create]
└─ Localization: [Number of strings to add]
Pattern References Found:
- [Similar implementation 1]: lib/path/to/similar.dart
- [Similar implementation 2]: lib/path/to/another.dart
Checkpoint Plan:
1. [Checkpoint name] - [Brief description]
2. [Checkpoint name] - [Brief description]
...
N. [Checkpoint name] - [Brief description]
Total: N checkpoints
Ready to start Checkpoint 1/N? (y/n)
Pattern Detection Mechanism
How Patterns Are Detected
Before each checkpoint, scan the codebase for similar implementations:
1. Identify what needs to be created/modified
2. Search for similar patterns in codebase:
- Enums → Look in lib/models/ for similar enums
- Models → Look in lib/models/ or lib/core/models/
- Services → Look in lib/core/services/
- Widgets → Look in lib/widgets/ or lib/screens/
- Providers → Look in lib/core/providers/
3. Extract the pattern structure
4. Present in checkpoint context
Pattern Context in Checkpoints
Each checkpoint includes:
Pattern Context:
- Similar implementation: lib/models/meal_type.dart
- Key patterns to follow:
• [Pattern element 1]
• [Pattern element 2]
• [Pattern element 3]
✅ CHECKPOINT X/Y complete
Progress: X/Y checkpoints ████░░ XX%
[If X < Y:]
Ready for CHECKPOINT (X+1)/Y? (y/n)
[If X == Y:]
🎉 Phase 2 Implementation Complete!
[Show summary]
If user responds "n" (checkpoint failed):
❌ CHECKPOINT X/Y verification failed
Let's debug before proceeding. What issue are you seeing?
Common issues for [checkpoint type]:
1. [Common issue 1]
2. [Common issue 2]
3. [Common issue 3]
[WAIT for user input, then diagnose and fix]
Category 3: Feature with Database (6-8 checkpoints)
Typical for: New features requiring schema changes
Checkpoint 1: [DELEGATE] Database migration → gastrobrain-database-migration
Checkpoint 2: Model class updates
Checkpoint 3: Service layer implementation
Checkpoint 4: UI components
Checkpoint 5: Wire up with providers
Checkpoint 6: Localization strings
Checkpoint 7: Error handling polish
Checkpoint 8: Integration verification
Category 4: Widget/Screen (5-6 checkpoints)
Typical for: New screens, complex widgets, UI components
Checkpoint 1: Widget structure and state
Checkpoint 2: Core UI implementation
Checkpoint 3: User interactions
Checkpoint 4: Data binding and state management
Checkpoint 5: Localization
Checkpoint 6: Responsive design verification
═══════════════════════════════════════
PHASE 2 COMPLETE - TESTING HANDOFF
All implementation checkpoints completed successfully.
Phase 3 (Testing) should be handled by:
→ gastrobrain-testing-implementation skill
The testing skill will:
1. Create test file structure
2. Implement tests one at a time
3. Verify each test before proceeding
4. Cover edge cases per Issue #39
Ready to hand off to testing implementation? (y/n)
═══════════════════════════════════════
Localization (Inline Handling)
Localization is handled within implementation checkpoints, not delegated:
═══════════════════════════════════════
CHECKPOINT X/Y: Localization
Goal: Add all user-facing strings to ARB files
Files to modify:
- lib/l10n/app_en.arb
- lib/l10n/app_pt.arb
Strings to add:
1. [key1]: "[English]" / "[Portuguese]"
2. [key2]: "[English]" / "[Portuguese]"
...
After adding strings:
Run: flutter gen-l10n
Verification:
1. flutter analyze lib/l10n/
2. Verify AppLocalizations.of(context)!.[key] compiles
3. Test both locales visually (if applicable)
═══════════════════════════════════════
Quality Gates
Every Checkpoint Verification
Static Analysis
flutter analyze [modified files]
# Must pass with no errors, warnings acceptable
File Length Check
Each file should be < 400 lines
If exceeding, consider extraction in next checkpoint
SOLID Principles
Single Responsibility: Each class/function has one purpose
Open/Closed: Extended via new code, not modification
Liskov Substitution: Subtypes work in parent contexts
Pattern mismatch → Review reference file more carefully
Missing dependency → Add to ServiceProvider
Checkpoint 2-N (Implementation):
Logic errors → Review similar patterns in codebase
Type mismatches → Check model definitions
Null safety issues → Verify nullable types
Localization Checkpoint:
gen-l10n fails → Check ARB syntax (valid JSON)
Missing key → Ensure key exists in both app_en.arb and app_pt.arb
Placeholder mismatch → Verify placeholder names match
Debug Protocol
When a checkpoint fails:
1. Get exact error message from user
2. Analyze the error type:
- Compilation error → Syntax or type issue
- Runtime error → Logic or null safety issue
- Static analysis warning → Code quality issue
3. Provide targeted fix
4. Re-verify before proceeding
Success Criteria
This skill succeeds when:
Pattern-First: Every implementation follows detected codebase patterns
Checkpoint-Driven: User confirms each checkpoint before proceeding
Quality Gates: Every checkpoint passes flutter analyze
Proper Delegation: Database and testing work delegated to specialized skills
Roadmap Sync: Checkboxes updated as work completes
Test-Ready: All code has DI and is testable
Localized: All UI strings in both ARB files
Clean Progress: Clear visibility into completion status
Remember: An experienced developer writes code that follows patterns, handles edge cases, and is immediately testable. Quality over speed. Each checkpoint verified before the next.