Quick Reference โก¶
Start here! Common commands and workflows for Nutri-E development.
๐ Need details? See Full Documentation Index
Daily Workflow¶
1. Start New Work¶
2. Make Changes & Commit¶
git add .
git commit -m "feat: Your change description"
git push -u origin feature/your-feature-name
3. Found a Problem? Create an Issue¶
If you discover bugs or issues NOT related to your current task:
gh issue create --title "Brief problem description" --body "$(cat <<'EOF'
## Problem
[What's wrong]
## Evidence
[Logs, timeline, examples]
## Proposed Fix
[How to fix it]
## References
[Links to files, PRs, issues]
EOF
)"
4. Create Pull Request¶
gh pr create --title "feat: Your feature" --body "Description"
# Auto-merge workflow monitors PR automatically
# (Handled by .github/workflows/auto-merge.yml)
# Wait for CI and Copilot review
sleep 90
# Resolve any conversations to unblock auto-merge
./scripts/resolve-pr-conversations.sh $(gh pr view --json number -q .number)
# Auto-merge will proceed automatically once all checks pass
5. After PR Merges - Clean Up¶
Common Commands¶
iOS Development¶
# Build project
xcodebuild -project ios/Nutri-E/Nutri-E.xcodeproj -scheme Nutri-E build
# Run tests
xcodebuild test -project ios/Nutri-E/Nutri-E.xcodeproj -scheme Nutri-E -destination 'platform=iOS Simulator,name=iPhone 15'
# Open in Xcode
open ios/Nutri-E/Nutri-E.xcodeproj
Cloudflare Workers¶
# Deploy to sandbox
cd cloudflare-worker-[name]
wrangler deploy --env sandbox-v2
# Deploy to production
wrangler deploy --env v2
# View logs
wrangler tail --format=pretty
Testing & Quality¶
# Check AI instruction sync
./scripts/check-ai-sync.sh
# Run DSLD tests
cd ios/Nutri-E
python3 test_dsld_forms.py
Memory MCP (Claude Code)¶
# Session start - recall all context
get_context(project: "nutri-e")
recall_decisions(project: "nutri-e")
recall_learnings(project: "nutri-e")
# Store new information
set_context(project: "nutri-e", key: "...", value: "...")
remember_decision(project: "nutri-e", decision: "...", rationale: "...")
remember_learning(project: "nutri-e", category: "gotcha|pattern|best-practice", content: "...")
remember_error(project: "nutri-e", error_pattern: "...", solution: "...")
# Debug - find solutions to errors
find_solution(project: "nutri-e", error: "error message")
search_all(project: "nutri-e", query: "search term")
File Locations¶
| What | Where |
|---|---|
| iOS App | ios/Nutri-E/Nutri-E/ |
| iOS Tests | ios/Nutri-E/Nutri-ETests/ |
| Core Data Models | ios/Nutri-E/Nutri-E/Nutri_E.xcdatamodeld/ |
| Services | ios/Nutri-E/Nutri-E/Services/ |
| Views | ios/Nutri-E/Nutri-E/Views/ |
| OpenAI Worker | cloudflare-worker-openai/ |
| DSLD Worker | cloudflare-worker-dsld/ |
| Apple Webhook | cloudflare-worker-apple/ |
| Scripts | scripts/ |
| CI/CD | .github/workflows/ |
Quick Fixes¶
Problem: iOS build fails¶
# Clean derived data
rm -rf ~/Library/Developer/Xcode/DerivedData/Nutri-E-*
# Rebuild
xcodebuild clean build
Problem: Worker not deploying¶
Problem: Git branch conflicts¶
# Abort and start fresh
git merge --abort
git checkout main
git pull origin main
git checkout -b feature/new-attempt
Important Notes¶
Branch Protection¶
- โ Never commit directly to main
- โ Always create feature branches
- โ PRs required for all changes
- โ Auto-merge enabled when tests pass
Copilot Review¶
- Waits 60 seconds for review
- Auto-resolves conversations after CI passes
- Can reject suggestions if they don't make sense
Version Bumping¶
# Bug fix: 1.0.2 Build 30 โ 1.0.2 Build 31
# (increment build number only)
cd ios/Nutri-E
# Edit Nutri-E.xcodeproj/project.pbxproj
# Change CURRENT_PROJECT_VERSION = 30; to CURRENT_PROJECT_VERSION = 31;
# New feature: 1.0.2 โ 1.1.0 Build 1
# (change marketing version, reset build to 1)
# Edit MARKETING_VERSION = 1.1.0;
# Edit CURRENT_PROJECT_VERSION = 1;
IMPORTANT: Always edit project.pbxproj directly and commit via PR. agvtool requires specific directory structure that may not work with all setups.
App Store Production Release¶
Complete workflow for releasing to App Store:
# 1. Create version bump branch
git checkout main
git pull origin main
git checkout -b chore/bump-version-1.0.X-buildY
# 2. Update version in project.pbxproj
# Edit: CURRENT_PROJECT_VERSION = Y;
# (and MARKETING_VERSION if needed)
# 3. Commit and push
git add ios/Nutri-E/Nutri-E.xcodeproj/project.pbxproj
git commit -m "chore: Bump version to 1.0.X Build Y for App Store release"
git push origin chore/bump-version-1.0.X-buildY
# 4. Create PR and wait for auto-merge
gh pr create --title "chore: Bump version to 1.0.X Build Y for App Store release"
# 5. After merge, create git tag
git checkout main
git pull origin main
git tag -a v1.0.X-buildY -m "Production release: Version 1.0.X Build Y"
git push origin v1.0.X-buildY
# 6. Build and submit in Xcode
open ios/Nutri-E/Nutri-E.xcodeproj
# Product โ Archive
# Organizer โ Validate App
# Distribute App โ App Store Connect
Manual steps in App Store Connect: 1. Go to https://appstoreconnect.apple.com 2. My Apps โ Nutri-E โ + Version 3. Select uploaded build 4. Add release notes 5. Submit for review
Deployment¶
- Workers auto-deploy to production on merge to main
- Manual
wrangler deployis used for sandbox deployments or emergency redeploys - iOS releases via TestFlight/App Store Connect (manual submission after build)
Documentation Index¶
๐ Core Docs¶
- CLAUDE.md - Full AI assistant instructions (2000+ lines)
- Memory MCP - Persistent context across Claude Code sessions
- README.md - Project overview
- CHANGELOG.md - Version history
๐ง Development Guides¶
- iOS Patterns - Services, views, Core Data
- Worker Functions - API reference
- Subscription System - Event-driven architecture
๐ Deployment & CI/CD¶
- GitHub Flow - Complete workflow guide
- Worker Environments - Sandbox vs Production
- Deploy Workflow - CI/CD config
๐งช Testing¶
- DSLD Coverage - Supplement form testing
- Test Scripts - Python test files
๐ ๏ธ Scripts¶
- cleanup-branches.sh - Branch cleanup
- check-ai-sync.sh - AI docs sync
๐ฑ Platform-Specific¶
- iOS Setup - Xcode project
- Android Plan - Future Android port
๐ Security & Privacy¶
- Security Guide - Device authentication
- Privacy Policy - GDPR/CCPA compliance
Emergency Contacts¶
- GitHub Issues: https://github.com/Stig-Johnny/nutri-e/issues
- App Store: https://apps.apple.com/us/app/nutri-e/id6753125391
- Website: https://www.nutrieapp.com
๐ก Tip: Bookmark this page for quick access to common commands!